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>2006-05-25 09:40:51 +0400
committerChristopher Faylor <me@cgf.cx>2006-05-25 09:40:51 +0400
commit3cd94e0c0ae9fce0bc8554c39af34c104778ff42 (patch)
treec8e1a08c0d546133a04dc5411fdbc2a683e88c5b /winsup/cygwin/debug.h
parent38229bcdcf45221857163f39d865d1d5d113a9b7 (diff)
* debug.h (ModifyHandle): Define new macro.
(modify_handle): Declare new function. * debug.cc (modify_handle): Define new function. * fhandler.h (fhandler_base::fork_fixup): Change return value from void to bool. * fhandler.cc (fhandler_base::fork_fixup): Return true if fork fixup has been done. * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance of protected handle via ModifyHandle if DEBUGGING. (fhandler_pipe::fixup_after_fork): Protect guard handle if fork fixup has been done.
Diffstat (limited to 'winsup/cygwin/debug.h')
-rw-r--r--winsup/cygwin/debug.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h
index 94d4c5a2b..e09208cf0 100644
--- a/winsup/cygwin/debug.h
+++ b/winsup/cygwin/debug.h
@@ -28,6 +28,7 @@ details. */
# define ForceCloseHandle CloseHandle
# define ForceCloseHandle1(h, n) CloseHandle (h)
# define ForceCloseHandle2(h, n) CloseHandle (h)
+# define ModifyHandle(h, n) do {} while (0)
# define ProtectHandle(h) do {} while (0)
# define ProtectHandle1(h,n) do {} while (0)
# define ProtectHandle2(h,n) do {} while (0)
@@ -55,6 +56,8 @@ details. */
close_handle (__PRETTY_FUNCTION__, __LINE__, (h), n, TRUE)
# endif
+# define ModifyHandle(h, n) modify_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, n)
+
# define ProtectHandle(h) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h)
# define ProtectHandle1(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n)
# define ProtectHandle2(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), n)
@@ -70,8 +73,10 @@ void __stdcall verify_handle (const char *, int, HANDLE)
__attribute__ ((regparm (3)));
bool __stdcall close_handle (const char *, int, HANDLE, const char *, bool)
__attribute__ ((regparm (3)));
-void __stdcall cygbench (const char *s) __attribute__ ((regparm (1)));
extern "C" void console_printf (const char *fmt,...);
+void __stdcall cygbench (const char *s) __attribute__ ((regparm (1)));
+void __stdcall modify_handle (const char *, int, HANDLE, const char *, bool)
+ __attribute__ ((regparm (3)));
void setclexec (HANDLE, HANDLE, bool);
void debug_fixup_after_fork_exec ();
extern int pinger;