This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fork and mutexs


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),

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]