Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-10-23 01:09:41 +0400
committerChristopher Faylor <me@cgf.cx>2001-10-23 01:09:41 +0400
commita05d38a8b4d277faa3643abff50ce5cb4fa6268e (patch)
treeae16b8a89588377ff8ec3b70d6cadafa34acc9bf /winsup/cygwin/debug.cc
parente7e231e531e62fbda5d7d019ca5d90363a955881 (diff)
* 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.cc13
1 files changed, 8 insertions, 5 deletions
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*/