aboutsummaryrefslogtreecommitdiff
path: root/winsup
AgeCommit message (Collapse)AuthorFilesLines
2005-02-01* fhandler_proc.cc (format_proc_partitions): Remove PartitionType check sinceChristopher Faylor2-3/+7
it could skip over partitions that are actually interesting.
2005-02-01* cygthread.cc (cygthread::terminate_thread): Wait briefly for notificationChristopher Faylor9-38/+83
event in the event that the thread was actually in the process of exiting. * pipe.cc (fhandler_pipe::dup): read_state is not supposed to be inheritable. Fix that. * path.cc (path_conv::check): Set symlen = 0 to avoid a compiler warning. * devices.h (devices::parsedisk): Declare new function. * devices.in (devices::parsedisk): Define new function. * dtable.cc (dtable::init_std_file_from_handle): Use device numbers rather than name. * fhandler_proc.cc (format_proc_partitions): Use parsedisk to generate disk names from numeric codes. (This was broken on two of my systems previously and is still broken now)
2005-02-01 * pipe.cc (fhandler_pipe::open): Allow re-opening of /proc/<pid>/fdCorinna Vinschen2-0/+38
pipes of the current process.
2005-02-01 * fhandler.cc (fhandler_base::get_proc_fd_name): Don't generateCorinna Vinschen9-34/+103
"device:" entry. * fhandler.h (fhandler_socket::open): New method. (fhandler_pipe::open): New method. * fhandler_proc.cc (fhandler_proc::exists): Return -2 in case of /proc/self. * fhandler_process.cc (fhandler_process::exists): Return -2 in case of symlinks, -3 for pipes and -4 for sockets. (fhandler_process::fstat): Handle pipes and sockets. (fhandler_process::open): Handle opening /proc/<pid>/fd. (fhandler_process::fill_filebuf): Generate empty names for non exisiting file descriptors. * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Always generate "socket:[number]" strings as on Linux. (fhandler_socket::open): New method. (fhandler_socket::fstat): Always return socket type. * path.cc (symlink_info::set): Remove unused second parameter. (path_conv::check): Handle pipes and sockets in /proc. Set correct device type for AF_LOCAL sockets. * pinfo.cc (_pinfo::commune_recv): Generate empty names for non exisiting file descriptors. (_pinfo::fd): Ditto. * pipe.cc (fhandler_pipe::open): New method.
2005-02-01 * mingwex/strtold.c (__asctoe64): Set endptr to 'e' if exponentDanny Smith2-0/+14
string is not valid.
2005-01-31* path.h (path_conv::set_name): Declare new function.Christopher Faylor5-0/+27
* path.cc (path_conv::set_name): Define new function. * fhandler.h (fhandler_dev_null::open): Declare new function. * fhandler.cc (fhandler_dev_null::open): Define new function.
2005-01-31* smallprint.c (rnarg): Use long rather than unsigned long so that we getChristopher Faylor2-5/+8
proper sign extension.
2005-01-31 * cygwinenv.sgml: Add words for (no)traverse option.Corinna Vinschen2-0/+14
2005-01-31 * environ.cc (set_traverse): New function.Corinna Vinschen2-6/+24
(parse_thing): Add "traverse" option. Sort options alphabetically. (environ_init): On NT, switch on traverse checking by default.
2005-01-31* smallprint.c (__rn): Regparmize.Christopher Faylor2-0/+8
2005-01-31* smallprint.c (rnarg): New macro.Christopher Faylor2-14/+28
(rnargLL): Ditto. (__rn): Rename from 'rn', add a mask argument, and use the mask argument to control how many significant digits to care about. (__small_vsprintf): Use __rn, rnarg, rnargLL, as appropriate.
2005-01-31* pinfo.cc (pinfo::exit): Only return low-order 16 bits when exiting.Christopher Faylor2-1/+5
2005-01-31 * fhandler_process.cc (format_process_maps): Get destbuf argument byCorinna Vinschen2-7/+13
reference. Allow resizing of destbuf as necessary. Fix string handling.
2005-01-31 * cygheap.h (class cygheap_fdenum): New class to enumerate usedCorinna Vinschen12-58/+307
fhandlers. * dtable.h (class dtable): Add cygheap_fdenum as friend class. * fhandler.h (fhandler_base::get_proc_fd_name): New virtual method to return a name for /proc/<pid>/fd. (fhandler_socket::get_proc_fd_name): Ditto. (fhandler_pipe::get_proc_fd_name): Ditto. (fhandler_virtual::opendir): Make virtual method. (fhandler_process::opendir): New method. * fhandler.cc (fhandler_base::get_proc_fd_name): New method. * fhandler_process.cc: Include ctype.h. (PROCESS_FD): Define. (process_listing): Add "fd". (fhandler_process::exists): Fix comment. Return 1 in case of "fd" directory. Handle files below "fd". (fhandler_process::fstat): Drop "self" handling. Set correct link count for directories. (fhandler_process::opendir): New method to handle "fd" directory. (fhandler_process::readdir): Add "fd" handling. (fhandler_process::open): Drop "self" handling. (fhandler_process::fill_filebuf): Ditto. Add "fd" handling. Fix "maps" output string. * fhandler_registry.cc (fhandler_registry::fstat): Set correct link count for directories. * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): New method. * path.cc (symlink_info::set): Fix thinko. * pinfo.cc (_pinfo::commune_recv): Rename pathbuf to path throughout. Drop local path variable in PICOM_FIFO case. Fix debug output. Close handles as early as possible. Add PICOM_FDS and PICOM_FD handling. (_pinfo::commune_send): Add PICOM_FDS and PICOM_FD handling. (_pinfo::fd): New method. (_pinfo::fds): New method. * pinfo.h (enum picom): Add PICOM_FDS and PICOM_FD. (_pinfo::fd): Declare. (_pinfo::fds): Declare. * pipe.cc (fhandler_pipe::get_proc_fd_name): New method.
2005-01-29* ntsec.sgml: Add Pierre's Windows 2003 text.Joshua Daniel Franklin4-12/+30
2005-01-29 * smallprint.c (rn): Change uval to unsigned long long to fix 64 bitCorinna Vinschen3-4/+19
handling. * fhandler_process.cc (format_process_maps): Print major, minor and inode numbers correctly.
2005-01-29 * autoload.cc (GetModuleFileNameExA): Add.Corinna Vinschen8-23/+324
(GetModuleInformation): Add. (QueryWorkingSet): Add. * fhandler.h (fhandler_virtual::get_filebuf): New method. * fhandler_proc.cc (PROC_SELF): Define. (proc_fhandlers): Change type of self to FH_PROC. (fhandler_proc::exists): Return -3 if self. (fhandler_proc::fstat): Handle self as symlink. (fhandler_proc::fill_filebuf): Handle self. * fhandler_process.cc: Include psapi.h. (PROCESS_EXENAME): Remove. (PROCESS_MAPS): Define. (PROCESS_ROOT): Define. (PROCESS_EXE): Define. (PROCESS_CWD): Define. (process_listing): Remove "exename", add "maps, "root", "exe" and "cwd" elements. (fhandler_process::exists): Return -2 for symlinks. (fhandler_process::fstat): Handle symlinks. (fill_filebuf): Evaluate pid if pid is 0. Use exename handling for exe. Handle maps, root and cwd. (format_process_maps): New function evaluating "maps". * path.cc (symlink_info::set): New method to fill symlink_info with data matching virtual symlinks. (path_conv::check): Handle virtual symlinks. * pinfo.cc (_pinfo::commune_recv): Add PICOM_CWD and PICOM_ROOT handling. (_pinfo::commune_send): Ditto. (_pinfo::root): New function. (_pinfo::cwd): New function. * pinfo.h (enum picom): Add PICOM_CWD and PICOM_ROOT. (_pinfo::root): Declare. (_pinfo::cwd): Declare.
2005-01-29* cygthread.cc (new): Add a little more debugging.Christopher Faylor3-1/+7
* thread.cc (pthread_null::exit): Add a _my_tls.remove() for safety.
2005-01-29* cygtls.cc (cygtls::call2): Move socket cleanup.Christopher Faylor2-4/+10
(cygtls::remove): Move socket cleanup here. Don't use _my_tls to reference it.
2005-01-28 * how-using.texinfo: Change text about using shortcuts.Corinna Vinschen2-11/+20
2005-01-28.Christopher Faylor1-3/+0
2005-01-272005-01-27 Oliver Stoeneberg <oliverst@online.de>Danny Smith2-2/+6
* include/winbase.h (PWIN32_FIND_DATA): Add typedef.
2005-01-272005-01-26 Oliver Stoeneberg <oliverst@online.de>Danny Smith2-0/+13
* include/malloc.h: Add missing return code defines for _heapwalk()
2005-01-26* pinfo.cc (pinfo::init): Avoid a compiler warning.Christopher Faylor2-2/+5
2005-01-26 * syscalls.cc (setpriority): Implement PRIO_PGRP, PRIO_USER andCorinna Vinschen2-10/+123
setting priority in other Cygwin processes. (getpriority): Implement PRIO_PGRP, PRIO_USER and getting nice value from other processes.
2005-01-26 * include/winuser.h (SW_SMOOTHSCROLL): Add define.Danny Smith2-0/+8
2005-01-262005-01-26 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet2-15/+11
* path.cc (path_conv::check): Return ENOTDIR rather than ENOENT when a component is not a directory. Remove unreachable code. (digits): Delete.
2005-01-26* pinfo.h (pinfo::init): Make third parameter non-optional and propagate changeChristopher Faylor4-58/+69
throughout. * pinfo.cc (set_myself): Pass INVALID_HANDLE_POINTER if h is NULL. (pinfo::init): Make third parameter non-optional. Eliminate use of PID_EXECED as an argument. Put setting of handle back inside loop but reorganize to try to open it only when necessary.
2005-01-25 * cygwin.din: Export getpriority and setpriority.Corinna Vinschen15-45/+189
* fork.cc (fork_parent): Copy parent's nice value into child. * spawn.cc (spawn_guts): Ditto. * miscfuncs.cc (winprio_to_nice): New function. (nice_to_winprio): Ditto. * pinfo.cc (pinfo_init): If parent is not a Cygwin process, set default nice value according to current Win32 priority class. * pinfo.h (class _pinfo): Add nice member. * syscalls.cc (setpriority): New function, only implementing PRIO_PROCESS for now. (getpriority): Ditto. (nice): Just call setpriority. * wincap.h (wincaps::has_extended_priority_class): New element. * wincap.cc: Implement above element throughout. * winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio. * include/limits.h (NZERO): New define. * include/cygwin/types.h (id_t): New datatype. * include/cygwin/version.h: Bump API minor version. * include/sys/resource.h: Add PRIO_XXX defines and prototypes for getpriority and setpriority.
2005-01-25 * path.cc (realpath): Allow to expand with .exe suffix.Corinna Vinschen2-1/+6
2005-01-22* install.texinfo: Add live CD, registry information.Joshua Daniel Franklin2-4/+25
2005-01-22* spawn.cc (spawn_guts): Perform same "cd" as in pinfo::exit below to make sureChristopher Faylor3-11/+24
that a stub process does not keep the current working directory busy after the "execed" process has exited.
2005-01-22* pinfo.cc (pinfo::init): Move everything but the MapViewOfFileEx out of theChristopher Faylor2-57/+77
loop since trying multiple times to call CreateFileMapping doesn't make much sense. Try to structure the loop a little better so that exiting with a break does the right thing. (pinfo::release): Release shared memory area if it exists and close handle if it exists.
2005-01-22* how-programming.texinfo: Add details about building a debugging version of ↵Joshua Daniel Franklin5-56/+62
the DLL. * how-using.texinfo: Correct rxvt README location. * install.texinfo: Add mount -m note to uninstall instructions.
2005-01-22* pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Make sure that processChristopher Faylor2-1/+15
has exited before getting an error code. (pinfo::exit): "cd" to innocuous location before exiting to make sure that process does not keep the current working directory busy while it is in the process of really exiting.
2005-01-22* how-programming.texinfo: Remove obsolete w32api instructions and add someChristopher Faylor2-10/+11
words about unpacking net release .tar.bz2.
2005-01-212005-01-21 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2-1/+8
* include/commdlg.h (OFN_DONTADDTORECENT): Added definition.
2005-01-18 * autoload.cc (CoInitialize): Remove.Corinna Vinschen3-75/+163
(CoUninitialize): Remove. (CoCreateInstance): Remove. (CoTaskMemFree): Add. (SHGetDesktopFolder): Add. * path.cc (shortcut_header): Remove. (shortcut_initalized): Remove. (GUID_shortcut): New static GUID. (struct win_shortcut_hdr): New struct describing Windows shortcut header structure. (symlink_worker): Rewrite creating Windows shortcuts. Create ITEMIDLIST if target exists. Only write once. (cmp_shortcut_header): Use win_shortcut_hdr structure for comparison. (check_shortcut): Rewrite to read only once from file. Allow skipping an ITIMIDLIST in the file.
2005-01-18 * lib/user32.def (MonitorFromPoint}: Correct suffix.Danny Smith2-1/+5
2005-01-17 * include/sys/stat.h (struct __stat64): Change st_size type toDanny Smith3-2/+8
__int64. * include/wchar.h (struct __stat64): Change st_size type to __int64.
2005-01-17* pinfo.h (maybe_set_exit_code_from_windows): Renamed from set_exit_state.Christopher Faylor4-11/+35
* pinfo.cc (pinfo::exit): Use renamed function. (proc_waiter): Ditto. Make a copy of input argument to avoid problems when procs array is shuffled. Flag when copy is made so that remove_proc knows when it is safe to reshuffle. * sigproc.cc (proc_terminate): Don't flag process_state as PID_EXITED. (remove_proc): Wait for waiter to finish copying pinfo element before moving it (an actual wait should be an extremely rare event).
2005-01-16* ps.cc (main): Eliminate use of PID_ZOMBIE.Christopher Faylor3-3/+22
* strace.cc (main): Recognize new option for displaying hex value of strace type. (handle_output_debug_string): Prepend output with hex value of strace message if -H is specified.
2005-01-16* init.cc (dll_entry): Remove unused extern.Christopher Faylor8-31/+51
* include/sys/cygwin.h: Remove PID_ZOMBIE. * pinfo.h: Rename EXITCODE_* defines. (pinfo::set_exit_state): Remove parameter. * pinfo.cc (set_exit_state): Remove parameter. Reverse sense of test so that exitcode is checked for having been set rather than not having been set. Set flag when exitcode has been established. Don't set PID_STATE here. (pinfo::init): Remove exitcode initialization. (pinfo::exit): Reflect change in EXITCODE_* naming. Set flag when exitcode has been established. Reflect change in arguments to set_process_state. (proc_waiter): Reflect change in arguments to set_process_state. Set process_state here and only here. * fhandler_process.cc (fhandler_process::fill_filebuf): Reflect removal of PID_ZOMBIE define. (format_process_stat): Ditto. (format_process_status): Ditto. * sigproc.cc (pid_exists): Ditto. (stopped_or_terminated): Ditto. Make sure that only low-order 16 bits of exitcode are used. * spawn.cc (spawn_guts): Reflect change in EXITCODE_* naming.
2005-01-15* sigproc.cc (sig_send): Don't complain if attempt to send signal to myselfChristopher Faylor2-2/+7
fails after I've "execed".
2005-01-14 * fhandler_disk_file.cc (fhandler_disk_file::facl): Pretend successfulCorinna Vinschen4-6/+58
SETACL if no acls are available. * fhandler.cc (fhandler_base::facl): Implement to return sensible values on GETACL and GETACLCNT. Pretend successful SETACL. * fhandler_virtual.cc (fhandler_virtual::facl): Ditto.
2005-01-13 * fhandler.h (fhandler_disk_file::touch_ctime): Declare.Corinna Vinschen3-14/+63
* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): New method to set file's ctime. (fhandler_disk_file::fchmod): Try opening file for writing first. Set file's ctime on success. (fhandler_disk_file::fchown): Ditto. (fhandler_disk_file::facl): Ditto.
2005-01-13 * pinfo.cc (pinfo::exit): Don't access self after releasing it.Corinna Vinschen3-3/+13
* path.h (path_conv::path_conv): Fill path with native device name in case of device argument.
2005-01-13 * fhandler_serial.cc (fhandler_serial::dup): Call overlapped_setupCorinna Vinschen2-1/+6
for child, not for parent.
2005-01-13 * include/_mingw.h: Increment version to 3.7.Earnie Boyd3-3/+5
* Makefile.in: Ditto.
2005-01-13* init.cc (dll_entry): Nuke attempt to set exit code since parent will useChristopher Faylor3-6/+8
windows exit code if needed. * pinfo.cc (pinfo::exit): Move release() here to minimize pid creation race (suggested by Pierre Humblet).