This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: fork and mutexs
- To: Robert Collins <robert dot collins at itdomain dot com dot au>, nhv at cape dot com,cygwin-developers at cygwin dot com, gsmith at nc dot rr dot com
- Subject: Re: fork and mutexs
- From: Jason Tishler <jason at tishler dot net>
- Date: Tue, 11 Sep 2001 12:39:37 -0400
Rob,
On Tue, Sep 11, 2001 at 12:38:01PM -0400, Jason Tishler wrote:
> [snip]
I forgot the patch! Sigh...
Thanks,
Jason
Index: thread.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/thread.cc,v
retrieving revision 1.46
diff -u -p -r1.46 thread.cc
--- thread.cc 2001/09/11 11:23:41 1.46
+++ thread.cc 2001/09/11 16:03:55
@@ -533,7 +533,10 @@ pthread_cond::fixup_after_fork ()
if (!win32_obj_id)
api_fatal("failed to create new win32 mutex\n");
if (waiting)
- api_fatal("Forked() while a condition variable has waiting threads.\nReport to cygwin@cygwin.com\n");
+ {
+ waiting = 0;
+ fprintf(stderr, "*** Forked() while a condition variable has waiting threads.\nReport to cygwin@cygwin.com\n");
+ }
}
@@ -663,7 +666,10 @@ pthread_mutex::fixup_after_fork ()
if (!win32_obj_id)
api_fatal("pthread_mutex::fixup_after_fork() failed to create new win32 mutex\n");
if (condwaits)
- api_fatal("Forked() while a mutex has condition variables waiting on it.\nReport to cygwin@cygwin.com\n");
+ {
+ condwaits = 0;
+ fprintf(stderr, "*** Forked() while a mutex has condition variables waiting on it.\nReport to cygwin@cygwin.com\n");
+ }
}
pthread_mutexattr::pthread_mutexattr ():verifyable_object (PTHREAD_MUTEXATTR_MAGIC),