From a05d38a8b4d277faa3643abff50ce5cb4fa6268e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 22 Oct 2001 21:09:41 +0000 Subject: * 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. --- winsup/cygwin/debug.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/debug.cc') diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc index 6de0757ab..ef2ba1fc4 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*/ -- cgit v1.2.3