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:
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*/