diff options
author | Christopher Faylor <me@cgf.cx> | 2001-10-22 21:09:41 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-10-22 21:09:41 +0000 |
commit | a05d38a8b4d277faa3643abff50ce5cb4fa6268e (patch) | |
tree | ae16b8a89588377ff8ec3b70d6cadafa34acc9bf /winsup/cygwin/debug.cc | |
parent | e7e231e531e62fbda5d7d019ca5d90363a955881 (diff) | |
download | newlib-a05d38a8b4d277faa3643abff50ce5cb4fa6268e.zip newlib-a05d38a8b4d277faa3643abff50ce5cb4fa6268e.tar.gz newlib-a05d38a8b4d277faa3643abff50ce5cb4fa6268e.tar.bz2 |
* debug.cc (set_errno): Return value of errno that was set, just like the
macro.
(setclexec_pid): Replace old handle with new handle.
* debug.h: Reflect change in arguments for setclexec_pid.
* fhandler.cc (fhandler_base::set_inheritance): Ditto.
(fhandler_base::fork_fixup): Ditto.
* cygerrno.h: Reflect return value change for set_errno.
Diffstat (limited to 'winsup/cygwin/debug.cc')
-rw-r--r-- | winsup/cygwin/debug.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc index 6de0757..ef2ba1f 100644 --- a/winsup/cygwin/debug.cc +++ b/winsup/cygwin/debug.cc @@ -214,11 +214,14 @@ out: } void -setclexec_pid (HANDLE h, bool setit) +setclexec_pid (HANDLE oh, HANDLE nh, bool setit) { - handle_list *hl = find_handle (h); + handle_list *hl = find_handle (oh); if (hl) - hl->clexec_pid = setit ? GetCurrentProcessId () : 0; + { + hl->clexec_pid = setit ? GetCurrentProcessId () : 0; + hl->h = nh; + } } /* Create a new handle record */ @@ -351,10 +354,10 @@ close_handle (const char *func, int ln, HANDLE h, const char *name, BOOL force) } /* Add a handle to the linked list of known handles. */ -void __stdcall +int __stdcall __set_errno (const char *func, int ln, int val) { debug_printf ("%s:%d val %d", func, ln, val); - _impure_ptr->_errno = val; + return _impure_ptr->_errno = val; } #endif /*DEBUGGING*/ |