summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * autoload.cc (CoInitialize): Remove.Corinna Vinschen2005-01-183-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.
* * pinfo.h (maybe_set_exit_code_from_windows): Renamed from set_exit_state.Christopher Faylor2005-01-174-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).
* * init.cc (dll_entry): Remove unused extern.Christopher Faylor2005-01-168-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.
* * sigproc.cc (sig_send): Don't complain if attempt to send signal to myselfChristopher Faylor2005-01-152-2/+7
| | | | fails after I've "execed".
* * fhandler_disk_file.cc (fhandler_disk_file::facl): Pretend successfulCorinna Vinschen2005-01-144-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.
* * fhandler.h (fhandler_disk_file::touch_ctime): Declare.Corinna Vinschen2005-01-133-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.
* * pinfo.cc (pinfo::exit): Don't access self after releasing it.Corinna Vinschen2005-01-133-3/+13
| | | | | * path.h (path_conv::path_conv): Fill path with native device name in case of device argument.
* * fhandler_serial.cc (fhandler_serial::dup): Call overlapped_setupCorinna Vinschen2005-01-132-1/+6
| | | | for child, not for parent.
* * init.cc (dll_entry): Nuke attempt to set exit code since parent will useChristopher Faylor2005-01-133-6/+8
| | | | | | windows exit code if needed. * pinfo.cc (pinfo::exit): Move release() here to minimize pid creation race (suggested by Pierre Humblet).
* Reorganize header file inclusion throughout so that cygerrno.h comes first.Christopher Faylor2005-01-1223-32/+51
| | | | | | | | | | * fhandler.h (select_record::thread_errno): Save any encountered errno here. (select_record::set_select_errno): New function. (select_record::saw_error): New function. (select_record::select_record): Initialize thread_errno to zero. * select.cc (set_handle_or_return_if_not_open): Set thread_errno on failure. (select_stuff::wait): Record errno for later resurrection in calling thread. (peek_serial): Ditto.
* Add missing changelog entry.Christopher Faylor2005-01-121-0/+4
|
* * pinfo.cc (pinfo::exit): Don't assume that this == myself.Christopher Faylor2005-01-123-6/+6
|
* * pinfo.cc (pinfo::init): Don't close input handle on temporary (?) failure.Christopher Faylor2005-01-112-1/+7
|
* revert previous erroneous checkin.Christopher Faylor2005-01-111-2/+2
|
* * pinfo.h (_pinfo::set_exit_state): Declare new function.Christopher Faylor2005-01-1110-101/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | (pinfo::exit): Move here from _pinfo::exit. * sigproc.cc (child_info::sync): Use new function to set exitcode and process_state. * pinfo.cc (_pinfo::exit): Ditto. (proc_waiter): Ditto. (_pinfo::set_exit_state): Define new function. (_pinfo::dup_proc_pipe): Close handle when there is no parent process around to care about the exit value. * dcrt0.cc (dll_crt0_0): Move subproc_ready synchronization later to make sure that myself is still mapped in parent. (do_exit): Reflect movement to pinfo::exit. (__api_fatal): Ditto. * exceptions.cc (signal_exit): Ditto. * errno.cc (errmap): Map PROC_NOT_FOUND. * init.cc (dll_entry): Release myself before exiting. * sigproc.cc (proc_can_be_signalled): Set errno appropriately. (sig_send): Ditto. Also remove ill-advised test for !myself->sendsig since this is an indication of a process which is still initializating -- it is not an error. (child_info::sync): Don't set exitcode here. Assume that will happen in proc_waiter, if necessary. * spawn.cc (spawn_guts): Delay "wait_for_myself" logic until later. Don't wait at all if the process has already exited. Reflect movement to pinfo::exit.
* * ChangeLog: Split and create ChangeLog-2004.Corinna Vinschen2005-01-112-3848/+3848
|
* * environ.cc: Yes, yes, the copyright date, as usual.Corinna Vinschen2005-01-111-1/+1
|
* * environ.cc (build_env): Disallow empty strings and strings startingCorinna Vinschen2005-01-112-0/+13
| | | | with '=' in Win32 environment.
* * fhandler_disk_file.cc: Fix copyright date.Corinna Vinschen2005-01-101-1/+2
|
* 2005-01-08 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet2005-01-082-16/+18
| | | | | * syscalls.cc (seteuid32): Only change the default dacl when seteuid succeeds. Do not close HKCU.
* * fhandler_process.cc: Fix copyright date.Corinna Vinschen2005-01-071-1/+1
|
* * fhandler_process.cc: Use strcasematch instead of strcasecmpCorinna Vinschen2005-01-062-3/+8
| | | | throughout.
* * syscalls.cc (rename): Fix behaviour in case of renaming directoriesCorinna Vinschen2005-01-062-11/+68
| | | | according to SUSv3.
* * fhandler_disk_file.cc (fhandler_base::open_fs): Don't allowCorinna Vinschen2005-01-062-0/+13
| | | | opening directories for writing.
* update copyrightChristopher Faylor2005-01-064-4/+6
|
* * timer.cc (timer_thread): Pass sigev pointer value as per SuSv3 rather thanChristopher Faylor2005-01-062-1/+6
| | | | pointer to sigev.
* * dcrt0.cc (multiple_cygwin_problem): Reorganize error message to not alwaysChristopher Faylor2005-01-053-9/+20
| | | | | | | | talk about a "version" when it's not a version. (dll_crt0_0): Change info passed to multiple_cygwin_problem to be a little more precise. * shared.cc (user_shared_initialize): Ditto. (shared_info::initialize): Ditto.
* * pinfo.cc (_pinfo::dup_proc_pipe): Can't close proc pipe when execing or weChristopher Faylor2005-01-042-2/+12
| | | | will suffer an exit code race.
* Update copyrights.Christopher Faylor2005-01-033-3/+3
|
* * signal.cc: Fix copyright date.Corinna Vinschen2005-01-031-1/+2
|
* * signal.cc (abort): Call _GLOBAL_REENT's __cleanup.Corinna Vinschen2005-01-032-2/+6
|
* * syscalls.cc (setmode): Call _fwalk with _GLOBAL_REENT.Corinna Vinschen2005-01-032-2/+7
|
* * cygthread.cc (cygthread::stub): Set inuse to false when exiting.Christopher Faylor2005-01-023-18/+20
| | | | | | | | | (cygthread::cygthread): Actually pass name as argument to debugging output to avoid SEGV when strace'ing. (cygthread::release): Don't set stack_ptr to NULL, since it is only set once on first entry to a stub not on each stub iteration. (cygthead::exit_thread): Remove obsolete function. * cygthread.h (cygthread::exit_thread): Ditto.
* * shared.cc (open_shared): Don't attempt VirtualAlloc magic if first attempt toChristopher Faylor2005-01-022-2/+8
| | | | map memory fails.
* * path.sgml: Encode programming example with CDATA.Joshua Daniel Franklin2004-12-311-0/+2
|
* * devices.cc (device::isfs): Return true for the logical case of devn == FH_FS.Christopher Faylor2004-12-302-1/+6
|
* * pinfo.cc (_pinfo::dup_proc_pipe): DUPLICATE_CLOSE_SOURCE closes the handleChristopher Faylor2004-12-282-5/+6
| | | | regardless, so revert previous change.
* * cygthread.cc (cygthread::stub): Add better debug output.Christopher Faylor2004-12-286-21/+58
| | | | | | | | | | | | (cygthread::cygthread): Ditto. (cygthread::terminate_thread): Ditto. Move inuse test earlier or suffer infinite loop. * pinfo.cc (_pinfo::dup_proc_pipe): Close handle if DuplicateHandle fails and process no longer exists. * spawn.cc (spawn_guts): Create process in suspended state if OS demands it. * wincap.cc: Add "start_proc_suspended" throughout. * wincap.h (wincaps): Ditto. (wincapc): Ditto.
* Update Makefile to use xmltoJoshua Daniel Franklin2004-12-272-2/+2
|
* * pinfo.cc (_pinfo::exit): Beef up debugging output.Christopher Faylor2004-12-273-5/+11
| | | | * sigproc.cc (proc_subproc): Detached children apparently need a ppid of 1.
* * init.cc (dll_entry): Previous code reversion was ill-advised. Revert it.Christopher Faylor2004-12-274-1/+18
| | | | | | * sigproc.cc (child_info::sync): Ditto. * pinfo.cc (_pinfo::exit): Don't set myself.procinfo to NULL since it is no longer required.
* * init.cc (dll_entry): Remove exit code setting.Christopher Faylor2004-12-275-11/+19
| | | | | | | | | * pinfo.cc (pinfo::init): Initialize exitcode to unset state rather than SIGTERM. (proc_waiter): Detect if exit code is unset and use status from GetExitCodeProcess. * sigproc.cc (child_info::sync): Remove exit code detection here since proc_waiter now (again) detects it.
* * fhandler.cc (fhandler_base::fchmod): Do the right thing when changing an "onChristopher Faylor2004-12-265-3/+24
| | | | | | | | | disk" device or fifo. (fhandler_base::fchown): Ditto for changing ownership. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate device files on ntfs partitions. * path.cc (path_conv::check): Use isfs function to figure out if a path exists on a filesystem to make sure that device files are caught.
* * child_info.h (CURR_CHILD_INFO_MAGIC): Update.Christopher Faylor2004-12-248-66/+121
| | | | | | | | | | | | | | | | | | | | | | | | (child_info::parent_wr_proc_pipe): Eliminate. * pinfo.h (_pinfo::alert_parent): Move here from pinfo class. (_pinfo::dup_proc_pipe): New method. (_pinfo::sync_proc_pipe): Ditto. * exceptions.cc (sig_handle_tty_stop): Reflect move of alert_parent. * init.cc (dll_entry): Exit with status one if main process called ExitProcess. * pinfo.cc (set_myself): Remove handling of parent_wr_proc_pipe. (_pinfo::exit): Reflect move of alert_parent. Set procinfo to NULL to flag that we are exiting normally. Always use exitcode when exiting (although this could be a little racy). (pinfo::init): Set default exit to SIGTERM. This will be the exit code reported if process is terminated. (_pinfo::dup_proc_pipe): New function. (pinfo::wait): Duplicate wr_proc_pipe to the right place. Use dup_proc_pipe to move the pipe to the child. (_pinfo::sync_proc_pipe): New function. (_pinfo::alert_parent): Move to _pinfo. Make sure that wr_proc_pipe is ours before using it. * sigproc.cc (child_info::child_info): Remove handling of parent_wr_proc_pipe. * spawn.cc (spawn_guts): Pass our wr_proc_pipe to the child when execing. Ensure that exit code of cygwin process started from windows is correctly set.
* * path.h (path_conv::set_normalized_path): Add second argument and fill it inChristopher Faylor2004-12-235-22/+34
| | | | | | | throughout. * path.cc (path_conv::check): Declare, set and use "strip_tail". (path_conv::set_normalized_path): Add and use second argument, replacing all tail stripping tests.
* * cygthread.cc (cygthread::cygthread): Guard debugging variable with "ifdefChristopher Faylor2004-12-232-0/+10
| | | | | DEBUGGING". (cygthread::release): Ditto.
* * path.cc (path_conv::check): Don't strip the trailing slash from a pathChristopher Faylor2004-12-232-1/+7
| | | | consisting only of two slashes.
* * cygthread.cc (cygthread::stub): Detect if thread function wants to releaseChristopher Faylor2004-12-239-34/+70
| | | | | | | | | | | | | | | | | | itself here, to avoid a race. (cygthread::release): Clear more stuff. Add a diagnostic for an internal error. * cygthread.h (auto_release): New function. * pinfo.h (pinfo::remember): Add an argument to denote whether child is detached. * fork.cc (fork_parent): Reflect change in arguments to pinfo::remember. * pinfo.cc (_pinfo::exit): Signal exit more forcibly. (proc_waiter): Use cygthread::auto_release to signify that cygthread::stub should release the thread. This should avoid a race. (pinfo::alert_parent): Don't signify an error when wr_proc_pipe == NULL. * sigproc.cc (proc_subproc): Add support for PROC_DETACHED_CHILD. * sigproc.h: Ditto. * spawn.cc (spawn_guts): Specify whether child is detached or not when calling pinfo::remember.
* * cygheap.cc (cygheap_setup_for_child): Add api_fatal to catch failingChristopher Faylor2004-12-225-13/+52
| | | | | | | | | | | | | | MapViewOfFileEx. * cygthread.cc (cygthread::stub): Previous change to make diagnostic output more informative was really a bust. Try again. Capture previous name in a new field in cygthread for diagnostic purposes. (cygthread::cygthread): Ditto. (cygthread::release): Add an argument to control whether h should be cleared or not. (cygthread::terminate_thread): Use 'inuse' for tests rather than 'h'. (cygthread): Add some diagnostic fields. (cygthread::release): Add an argument. * pinfo.cc (proc_waiter): Accommodate change to cygthread::release.
* * cygthread.cc (cygthread::stub): Make diagnostic output more informative.Christopher Faylor2004-12-222-2/+7
|