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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-09-02 01:04:34 +0400
committerChristopher Faylor <me@cgf.cx>2000-09-02 01:04:34 +0400
commit837528aa51777d445e6fd5b6f4da4c3d99b82592 (patch)
tree1e6c178d7593bb91797f75e2b2ea99aa0e58635e /winsup
parent488c7683e311fe19bb0c2d03e3a260ac9f95e86b (diff)
* sigproc.cc (sigproc_init): Create wait_sig_inited without auto-reset to avoid
potential races. (init_child_info): Avoid unneeded test.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/sigproc.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f9e14a7c1..2be8e4fb4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+Fri Sep 1 16:57:44 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * sigproc.cc (sigproc_init): Create wait_sig_inited without auto-reset
+ to avoid potential races.
+ (init_child_info): Avoid unneeded test.
+
Fri Sep 1 16:51:26 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (proc_info): Rename proc_exists which takes a pid to
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 55cde230e..30976b62a 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -610,7 +610,7 @@ sig_dispatch_pending (int justwake)
void __stdcall
sigproc_init ()
{
- wait_sig_inited = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
+ wait_sig_inited = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
ProtectHandle (wait_sig_inited);
/* local event signaled when main thread has been dispatched
@@ -914,7 +914,7 @@ init_child_info (DWORD chtype, child_info *ch, pid_t pid, HANDLE subproc_ready)
ch->subproc_ready = subproc_ready;
if (chtype != PROC_EXEC || !parent_alive)
ch->parent_alive = hwait_subproc;
- else if (parent_alive)
+ else
DuplicateHandle (hMainProc, parent_alive, hMainProc, &ch->parent_alive,
0, 1, DUPLICATE_SAME_ACCESS);
}