Commit Graph

4737 Commits

Author SHA1 Message Date
Chris Sutcliffe ea27b6f219 2005-01-21 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/commdlg.h (OFN_DONTADDTORECENT): Added definition.
2005-01-21 13:39:35 +00:00
Corinna Vinschen c20ec37fbd * autoload.cc (CoInitialize): Remove.
(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 13:00:18 +00:00
Danny Smith 4d6b4804e9 * lib/user32.def (MonitorFromPoint}: Correct suffix. 2005-01-18 07:14:54 +00:00
Danny Smith 4c9f0d3547 * include/sys/stat.h (struct __stat64): Change st_size type to
__int64.
	* include/wchar.h (struct __stat64): Change st_size type to __int64.
2005-01-17 05:03:17 +00:00
Christopher Faylor 37d5841f83 * pinfo.h (maybe_set_exit_code_from_windows): Renamed from set_exit_state.
* 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-17 04:12:08 +00:00
Christopher Faylor 459a956197 * ps.cc (main): Eliminate use of PID_ZOMBIE.
* 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 17:13:51 +00:00
Christopher Faylor 85b3fb9640 * init.cc (dll_entry): Remove unused extern.
* 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-16 17:00:27 +00:00
Christopher Faylor fdd857a1f6 * sigproc.cc (sig_send): Don't complain if attempt to send signal to myself
fails after I've "execed".
2005-01-15 23:43:42 +00:00
Corinna Vinschen aafdf30f7a * fhandler_disk_file.cc (fhandler_disk_file::facl): Pretend successful
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-14 22:03:40 +00:00
Corinna Vinschen 36ca239fd4 * fhandler.h (fhandler_disk_file::touch_ctime): Declare.
* 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 22:56:20 +00:00
Corinna Vinschen 0dabe0e0c2 * pinfo.cc (pinfo::exit): Don't access self after releasing it.
* path.h (path_conv::path_conv): Fill path with native device
	name in case of device argument.
2005-01-13 22:18:57 +00:00
Corinna Vinschen 9b8e782e11 * fhandler_serial.cc (fhandler_serial::dup): Call overlapped_setup
for child, not for parent.
2005-01-13 20:10:04 +00:00
Earnie Boyd bfe069a3b0 * include/_mingw.h: Increment version to 3.7.
* Makefile.in: Ditto.
2005-01-13 19:51:02 +00:00
Christopher Faylor a09a6e6838 * init.cc (dll_entry): Nuke attempt to set exit code since parent will use
windows exit code if needed.
* pinfo.cc (pinfo::exit): Move release() here to minimize pid creation race
(suggested by Pierre Humblet).
2005-01-13 16:38:35 +00:00
Earnie Boyd 29de2b1938 * include/sys/stat.h (_S_IFLNK, S_IFLNK, _S_ISLNK, S_ISLNK, _lstat,
lstat): Remove.
	* include/errno.h (ELOOP): Ditto.
2005-01-13 12:40:37 +00:00
Danny Smith 6c03322566 2005-01-13 Benoit Blanchon <bblanchon@users.sourceforge.net>
* include/wininet.h (InternetCheckConnectionA,
	InternetCheckConnectionW) Add prototypes.
	(INTERNET_RAS_INSTALLED, INTERNET_CONNECTION_OFFLINE,
	INTERNET_CONNECTION_CONFIGURED): Add defines.
2005-01-13 09:14:42 +00:00
Christopher Faylor 169c465a83 Reorganize header file inclusion throughout so that cygerrno.h comes first.
* 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.
2005-01-12 22:40:46 +00:00
Christopher Faylor 066e8c8424 Add missing changelog entry. 2005-01-12 20:06:17 +00:00
Christopher Faylor 48befd8305 * pinfo.cc (pinfo::exit): Don't assume that this == myself. 2005-01-12 18:05:07 +00:00
Danny Smith 49f7830187 * include/tchar.h (_tfreopen): Add UNICODE mappings. 2005-01-12 09:08:12 +00:00
Pierre Humblet 114b7248ee 2005-01-11 Pierre Humblet <pierre.humblet@ieee.org>
* mkpasswd.c (print_win_error): Transform into macro.
        (_print_win_error): Upgrade former print_win_error by
        printing the line.
        (current_user): Call _print_win_error.
        (enum_users): Print name in case of lookup failure.
        (enum_local_groups): Ditto.
2005-01-11 23:03:24 +00:00
Christopher Faylor 7730395470 * pinfo.cc (pinfo::init): Don't close input handle on temporary (?) failure. 2005-01-11 16:58:31 +00:00
Christopher Faylor d1adad9045 revert previous erroneous checkin. 2005-01-11 15:49:17 +00:00
Christopher Faylor 2380dfe14c * pinfo.h (_pinfo::set_exit_state): Declare new function.
(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.
2005-01-11 15:31:04 +00:00
Earnie Boyd aa67a4484e * include/sys/stat.h (_S_IFLNK, S_IFLNK, _S_ISLNK, S_ISLNK, _lstat,
lstat): Conditionalize defines for __STRICT_ANSI__.
2005-01-11 13:34:42 +00:00
Corinna Vinschen 0e05431799 * ChangeLog: Split and create ChangeLog-2004. 2005-01-11 12:48:34 +00:00
Corinna Vinschen eade2ea557 * environ.cc: Yes, yes, the copyright date, as usual. 2005-01-11 12:45:08 +00:00
Corinna Vinschen d1ce9364f3 * environ.cc (build_env): Disallow empty strings and strings starting
with '=' in Win32 environment.
2005-01-11 12:42:35 +00:00
Earnie Boyd 58bdcd7fc7 * include/errno.h (ELOOP): Add definition. 2005-01-10 21:15:40 +00:00
Corinna Vinschen 0b99127e40 * fhandler_disk_file.cc: Fix copyright date. 2005-01-10 13:09:56 +00:00
Chris Sutcliffe 2201bc5378 2005-01-07 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/commctrl.h (ComboBox_SetMinVisible,
	ComboBox_GetMinVisible): Added Macros.
	* include/winuser.h (CB_SETMINVISIBLE, CB_GETMINVISIBLE):
	Added definitions.
2005-01-10 11:59:25 +00:00
Danny Smith 4073a59300 * mingwex/complex/(cabsl.c cacosl.c cacoshl.c cargl.c casinl.c
casinhl.c catanl.c catanhl.c ccosl.c ccoshl.c cexpl.c cimagl.c
	clogl.c cpowl.c cprojl.c creall.c csinl.c csinhl.c csqrtl.c
	ctanl.c ctanhl.c): New files.
	* mingwex/Makefile.in (COMPLEX_DISTFILES): Adjust.
	(COMPLEX_OBJS): Adjust.
	* include/complex.h (cabsl, cacosl, cacoshl, cargl, casinf.
	casinhl, catanl, catanhl, ccosl, ccoshl, cexpl, cimagl, clogl,
	cpowl, cprojl, creall, csinl, csinhl, csqrtl, ctanl, ctanhl):
	Declare.
2005-01-10 05:03:55 +00:00
Christopher Faylor 76eb619239 * cygrun.c (main): Fix exit code so that it reflects UNIX style.
* winsup.api/ltp/fork04.c (setup): Accommodate change in putenv declaration.
2005-01-10 04:13:39 +00:00
Pierre Humblet a6888c92d9 2005-01-08 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (seteuid32): Only change the default dacl when
	seteuid succeeds. Do not close HKCU.
2005-01-08 18:33:07 +00:00
Corinna Vinschen a3acb4a5ce * fhandler_process.cc: Fix copyright date. 2005-01-07 11:39:52 +00:00
Corinna Vinschen 69008322ef * fhandler_process.cc: Use strcasematch instead of strcasecmp
throughout.
2005-01-06 23:00:08 +00:00
Corinna Vinschen 6e450bdeed * syscalls.cc (rename): Fix behaviour in case of renaming directories
according to SUSv3.
2005-01-06 22:10:08 +00:00
Corinna Vinschen 375c7faa4c * fhandler_disk_file.cc (fhandler_base::open_fs): Don't allow
opening directories for writing.
2005-01-06 17:43:55 +00:00
Christopher Faylor e66b2c9522 update copyright 2005-01-06 16:36:40 +00:00
Christopher Faylor fdb83f2269 * timer.cc (timer_thread): Pass sigev pointer value as per SuSv3 rather than
pointer to sigev.
2005-01-06 14:09:14 +00:00
Danny Smith 23edaf199a * include/_mingw.h (__int16): Define as short. 2005-01-06 11:20:51 +00:00
Danny Smith 5c54e03a27 * include/stdio.h (P_tmpdir): Add define. 2005-01-06 11:10:58 +00:00
Christopher Faylor 2d76a612d2 * dcrt0.cc (multiple_cygwin_problem): Reorganize error message to not always
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.
2005-01-05 21:40:08 +00:00
Christopher Faylor abb13199ba * pinfo.cc (_pinfo::dup_proc_pipe): Can't close proc pipe when execing or we
will suffer an exit code race.
2005-01-04 14:57:42 +00:00
Christopher Faylor dbdbed283b Update copyrights. 2005-01-03 18:16:46 +00:00
Corinna Vinschen 42347b0a3b * signal.cc: Fix copyright date. 2005-01-03 18:11:00 +00:00
Corinna Vinschen 1a063c5030 * signal.cc (abort): Call _GLOBAL_REENT's __cleanup. 2005-01-03 18:06:26 +00:00
Earnie Boyd a6f8d3d6c6 * Makefile.in (inst_docdir): For Cygwin target set to share/doc/. 2005-01-03 16:32:25 +00:00
Corinna Vinschen 26e3b0f006 * syscalls.cc (setmode): Call _fwalk with _GLOBAL_REENT. 2005-01-03 10:59:09 +00:00
Danny Smith 9e5e1983f8 2005-01-02 Jiri Malak <Jiri.Malak@geac.cz>
* include/winnt.h (GetCurrentFiber, GetFiberData): Make inline
	assembly code conditional on _X86_.
2005-01-02 21:46:06 +00:00
Earnie Boyd 97f3a22475 * include/_mingw.h: Increment version to 3.6
* Makefile.in: Ditto
2005-01-02 17:17:17 +00:00
Earnie Boyd 636a3bf5bb * lib/uxtheme.def: Really remove the \r. 2005-01-02 14:15:16 +00:00
Earnie Boyd 94d17419a6 * include/afxres.h: Remove the \r from the line ending.
* include/errorrep.h: Ditto.
	* include/shldisp.h: Ditto.
	* include/tschema.h: Ditto.
	* lib/dhcpcsvc.def: Ditto.
	* lib/uxtheme.def: Ditto.
	* lib/wldap32.def: Ditto.
2005-01-02 14:11:28 +00:00
Earnie Boyd 615c8c8884 * include/w32api.h: Increment version.
* Makefile.in: Ditto.
2005-01-02 13:48:13 +00:00
Christopher Faylor 538776b743 * cygthread.cc (cygthread::stub): Set inuse to false when exiting.
(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.
2005-01-02 02:22:25 +00:00
Christopher Faylor d8c83adc04 * shared.cc (open_shared): Don't attempt VirtualAlloc magic if first attempt to
map memory fails.
2005-01-02 00:34:55 +00:00
Danny Smith f8316b46dd * include/winerror.h (ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY):
Correct typo.
2005-01-01 08:57:31 +00:00
Joshua Daniel Franklin ede7692fd2 * path.sgml: Encode programming example with CDATA. 2004-12-31 01:13:28 +00:00
Christopher Faylor d89a855e73 * devices.cc (device::isfs): Return true for the logical case of devn == FH_FS. 2004-12-30 16:21:59 +00:00
Corinna Vinschen f312634c02 * bsd_mutex.cc: Include limits.h.
(MSLEEP_MUTEX): New define for third parameter to msleep_event_name.
	(MSLEEP_SEM): Ditto.
	(MSLEEP_EVENT): Ditto.
	(msleep_event_name): Add third parameter to allow multiple
	synchronization objects per ident.
	(_msleep): Implement new synchronization technique to make sure
	that all threads have been woken up by a corresponding wakeup call.
	(wakeup): Ditto.
2004-12-30 15:58:27 +00:00
Chris Sutcliffe 3a39329a25 2004-12-29 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
*include/winuser.h (MNS_*, WM_MENUCOMMAND,
	WM_MENUGETOBJECT, WM_MENUDRAG, WM_NCMOUSEHOVER,
	WM_NCMOUSELEAVE, WM_UNINITMENUPOPUP,
	SPI_GETFOREGROUNDLOCKTIMEOUT,
	SPI_SETFOREGROUNDLOCKTIMEOUT): Added definitions.
	*include/imm.h (WM_IME_REQUEST): Added definition.
	*include/shlobj.h (SLGP_RAWPATH,
	SLGP_UNCPRIORITY): Added definition.
2004-12-29 12:15:19 +00:00
Chris Sutcliffe 5f0fd59974 Added HSHELL_FLASH definition 2004-12-29 00:31:31 +00:00
Christopher Faylor 264a0b2f54 * pinfo.cc (_pinfo::dup_proc_pipe): DUPLICATE_CLOSE_SOURCE closes the handle
regardless, so revert previous change.
2004-12-28 06:07:45 +00:00
Christopher Faylor 57ba174fa0 * cygthread.cc (cygthread::stub): Add better debug output.
(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.
2004-12-28 01:27:26 +00:00
Joshua Daniel Franklin b75ec93a63 Update Makefile to use xmlto 2004-12-27 19:03:56 +00:00
Christopher Faylor 6e3c97b14e * pinfo.cc (_pinfo::exit): Beef up debugging output.
* sigproc.cc (proc_subproc): Detached children apparently need a ppid of 1.
2004-12-27 17:19:25 +00:00
Christopher Faylor 933673e83b * init.cc (dll_entry): Previous code reversion was ill-advised. Revert it.
* sigproc.cc (child_info::sync): Ditto.
* pinfo.cc (_pinfo::exit): Don't set myself.procinfo to NULL since it is no
longer required.
2004-12-27 02:13:30 +00:00
Christopher Faylor 445d5ce8fc * init.cc (dll_entry): Remove exit code setting.
* 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.
2004-12-27 00:35:19 +00:00
Christopher Faylor 8711eddd80 * fhandler.cc (fhandler_base::fchmod): Do the right thing when changing an "on
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.
2004-12-26 02:10:30 +00:00
Danny Smith 9a3412eea8 * mingwex/complex/(cabsf.c cacosf.c cacoshf.c cargf.c casinf.c
casinhf.c catanf.c catanhf.c ccosf.c ccoshf.c cexpf.c cimagf.c
	clogf.c cpowf.c cprojf.c crealf.c csinf.c csinhf.c csqrtf.c
	ctanf.c ctanhf.c): New files.
	* mingwex/Makefile.in (COMPLEX_DISTFILES): Adjust.
	(COMPLEX_OBJS(: Adjust.
	* include/complex.h (cabsf, cacosf, cacoshf, cargf, casinf.
	casinhf, catanf, catanhf, ccosf, ccoshf, cexpf, cimagf, clogf,
	cpowf, cprojf, crealf, csinf, csinhf, csqrtf, ctanf, ctanhf):
	Declare.
2004-12-25 23:56:19 +00:00
Joshua Daniel Franklin c98b30eadc * .sgml: Cleanup markup for XML validity. 2004-12-24 21:58:38 +00:00
Christopher Faylor e1736c2f13 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
(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.
2004-12-24 18:31:23 +00:00
Danny Smith 4697fbcd51 2004-12-24 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shldisp.h: New file.
	* include/shlobj.h (IObjMgr): Added interface definiton.
	* lib/shell32.c (CLSID_AutoComplete, IID_AutoComplete,
	IID_AutoComplete2, CLSID_ACLMulti, IID_IObjMgr,
	CLSID_ACListISF, IID_IACList): Added GUIDs.
	* include/shlguid.h (CLSID_AutoComplete, IID_AutoComplete,
	IID_AutoComplete2, CLSID_ACLMulti, IID_IObjMgr,
	CLSID_ACListISF, IID_IACList): Added GUIDs.
2004-12-24 11:14:35 +00:00
Christopher Faylor 861ef99725 * path.h (path_conv::set_normalized_path): Add second argument and fill it in
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.
2004-12-23 21:37:44 +00:00
Christopher Faylor 7a2ba9dbec * cygthread.cc (cygthread::cygthread): Guard debugging variable with "ifdef
DEBUGGING".
(cygthread::release): Ditto.
2004-12-23 15:36:59 +00:00
Christopher Faylor aad93aea3e * path.cc (path_conv::check): Don't strip the trailing slash from a path
consisting only of two slashes.
2004-12-23 15:26:38 +00:00
Christopher Faylor 4ee52924a6 * cygthread.cc (cygthread::stub): Detect if thread function wants to release
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.
2004-12-23 14:57:08 +00:00
Danny Smith 3993374d4e * include/commctrl.h (CDRF_NOTIFYSUBITEMDRAW): Add define.
Thanks to: Chris Sutcliffe  <ironhead@walled.net>
	(CDRF_*): Use hex notation for constants.
2004-12-23 08:13:51 +00:00
Christopher Faylor 63fcc6d48f * cygheap.cc (cygheap_setup_for_child): Add api_fatal to catch failing
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.
2004-12-22 18:12:30 +00:00
Christopher Faylor 16bd231ec6 * cygthread.cc (cygthread::stub): Make diagnostic output more informative. 2004-12-22 17:10:19 +00:00
Christopher Faylor 9bc36097c9 * pinfo.cc (proc_waiter): Zero wait_thread in child to avoid races with process
termination.
* cygthread.cc (cygthread::terminate): Clumsily detect when h has gone away and
attempt no further action.
2004-12-22 16:59:03 +00:00
Christopher Faylor 9c0d960d7f * cygthread.h (cygthread::release): Just declare here.
* cygthread.cc (cygthread::release): Define here.  Use InterlockedExchange to
set inuse or suffer potential races.
(cygthread::terminate): Use release().
2004-12-22 16:19:27 +00:00
Corinna Vinschen 4b84574c07 * fhandler_process.cpp (format_process_status): Use tabs in formatting
instead of spaces.
2004-12-22 11:35:29 +00:00
Corinna Vinschen 13d991bbea * path.cc (set_normalized_path): Allow empty pathnames. 2004-12-22 11:31:30 +00:00
Christopher Faylor e85c18a883 * spawn.cc (spawn_guts): Force parent to forget about P_DETACH'ed process. 2004-12-21 18:45:01 +00:00
Christopher Faylor e0520ec4b7 * path.cc (normalize_win32_path): Remove unneeded check for dots. 2004-12-20 17:55:22 +00:00
Christopher Faylor 8d060512a6 * path.cc (normalize_posix_path): Remove unneeded check for dots.
(path_conv::set_normalized_path): Strip trailing dots, similarly to what had
previously been done for the win32 path.
2004-12-20 16:31:18 +00:00
Danny Smith 7ffd6c6f17 * include/wchar.h (wcsdup): Correct prototype.
* include/string.h (wcsdup): Correct prototype.
2004-12-20 00:03:06 +00:00
Christopher Faylor b861c0a383 * path.cc (normalize_win32_path): Make third arg pass-by reference. Reorganize
slightly to eliminate extra variables.
(normalize_posix_path): Ditto.
(path_conv::check): Reflect change in arguments.
(mount_info::conv_to_posix_path): Ditto.
(mount_info::add_item): Ditto.
2004-12-19 03:27:09 +00:00
Christopher Faylor 5524af6e9b * child_info.h (CURR_CHILD_INFO_MAGIC): Use updated value.
* path.cc (path_conv::check): Check the output Win32 path for trailing spaces
and dots, not the input path.  Disallow all use of foo./bar since consistently
getting this right is time consuming.  Remove strange test for "unc\" since no
one seems to know what it's for.
2004-12-19 02:40:40 +00:00
Christopher Faylor bbe009b770 revert erroneous checkin 2004-12-18 16:41:27 +00:00
Christopher Faylor b25e8b65c2 * fhandler_proc.cc (proc_listing): Add entry for "self".
(proc_fhandlers): Add entry for "self".
* fhandler_process.cc (fhandler_process::fstate): Handle "self".
(fhandler_process::open): Handle "self".
2004-12-18 16:37:44 +00:00
Christopher Faylor 8232f2e050 * sigproc.cc (proc_subproc): Fix long-standing problem. Only wait for "all
processes" if pid == -1 -- not just if pid is negative.
(proc_can_be_signalled): Fix another long-standing problem.  Set correct errno
when detecting an exited process.
2004-12-17 17:42:03 +00:00
Corinna Vinschen a435749dc2 * fhandler_console.cc (get_win32_attr): Avoid inappropriate intensity
interchanging that used to render reverse output unreadable when
	non-reversed text is bright.
2004-12-16 13:19:08 +00:00
Corinna Vinschen 2ef89b220a * cygwin.din: Add utmpx symbols.
* syscalls.cc: Include utmpx.h.  Implement utmpx functions as stubs
	to utmp functions.
	(copy_ut_to_utx): New static function.
	(pututline): Change from void to struct utmp * as on Linux.
	(setutxent): New function.
	(endutxent): New function.
	(getutxent): New function.
	(getutxid): New function.
	(getutxline): New function.
	(pututxline): New function.
	* include/utmpx.h: New file.
	* include/cygwin/utmp.h: New file.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/utmp.h: Include cygwin/utmp.h.  Move stuff common with
	utmpx functionality there.
	(pututline): Declare struct utmp *.
2004-12-15 17:29:01 +00:00
Corinna Vinschen dad3ae73b3 * tty.cc (tty_list::terminate): Guard releasing the tty with tty_mutex.
(tty::init): Set master_pid to 0.
2004-12-14 17:19:22 +00:00
Corinna Vinschen 988566db0c * fhandler_console.cc (read): Consider offset within scrolling
region of the console window.
2004-12-14 12:09:51 +00:00
Corinna Vinschen c6ad91f3f8 * cygheap.h (cwdstuff::get_drive): Release cwd_lock. 2004-12-13 19:33:30 +00:00
Bas van Gompel 3020ba83ce * fhandler.cc (fhandler_base::puts_readahead): Fix end-condition. 2004-12-12 02:15:34 +00:00
Corinna Vinschen aee05403d1 * errno.cc (errmap): Map ERROR_INVALID_ADDRESS to EINVAL instead of
EOVERFLOW.
2004-12-10 17:43:00 +00:00