]> sourceware.org Git - newlib-cygwin.git/commitdiff
* bsd_mutex.cc (_msleep): Whitespace fix.
authorCorinna Vinschen <corinna@vinschen.de>
Fri, 1 Apr 2005 15:35:47 +0000 (15:35 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Fri, 1 Apr 2005 15:35:47 +0000 (15:35 +0000)
* process.cc (process::process): Handle invalid signal_arrived values
more gracefully.

winsup/cygserver/ChangeLog
winsup/cygserver/bsd_mutex.cc
winsup/cygserver/process.cc

index 9b4ed31c9e33f09a9b948eddb4ce4209eada8a69..9bf453acec54368c4670137f2b29916bf96f928e 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-01  Corinna Vinschen  <corinna@vinschen.de>
+
+       * bsd_mutex.cc (_msleep): Whitespace fix.
+       * process.cc (process::process): Handle invalid signal_arrived values
+       more gracefully.
+
 2004-12-30  Corinna Vinschen  <corinna@vinschen.de>
 
        * bsd_mutex.cc: Include limits.h.
index 27217486a819ae1a320723165621c28edcafc4b3..82ce4bf27c09c979477b789079e6d3a24ff76ebf 100644 (file)
@@ -1,6 +1,6 @@
 /* bsd_mutex.cc
 
-   Copyright 2003, 2004 Red Hat Inc.
+   Copyright 2003, 2004, 2005 Red Hat Inc.
 
 This file is part of Cygwin.
 
@@ -236,7 +236,7 @@ _msleep (void *ident, struct mtx *mtx, int priority,
   if ((priority & PCATCH)
       && td->client->signal_arrived () != INVALID_HANDLE_VALUE)
     obj_cnt = 4;
-  
+
   switch (WaitForMultipleObjects (obj_cnt, obj, FALSE, timo ?: INFINITE))
     {
       case WAIT_OBJECT_0:      /* wakeup() has been called. */
index e03370d11adc3d5b1eb12db8ae2d74a085fb8734..6f8f40ea5c485300f830f4433328cf9a2601f4ea 100644 (file)
@@ -1,6 +1,6 @@
 /* process.cc
 
-   Copyright 2001, 2002, 2003, 2004 Red Hat Inc.
+   Copyright 2001, 2002, 2003, 2004, 2005 Red Hat Inc.
 
    Written by Robert Collins <rbtcollins@hotmail.com>
 
@@ -60,13 +60,17 @@ process::process (const pid_t cygpid, const DWORD winpid, HANDLE signal_arrived)
   else
     debug_printf ("got handle %p for new cache process %d(%lu)",
                  _hProcess, _cygpid, _winpid);
-  if (signal_arrived != INVALID_HANDLE_VALUE)
+  if (!signal_arrived)
+    system_printf ("signal_arrived NULL for process %d(%lu)",
+                  _cygpid, _winpid);
+  else if (signal_arrived != INVALID_HANDLE_VALUE)
     {
       if (!DuplicateHandle (_hProcess, signal_arrived,
                            GetCurrentProcess (), &_signal_arrived,
                            0, FALSE, DUPLICATE_SAME_ACCESS))
        system_printf ("error getting signal_arrived to server (%lu)",
                       GetLastError ());
+       _signal_arrived = INVALID_HANDLE_VALUE;
     }
   InitializeCriticalSection (&_access);
   debug ("initialized (%lu)", _cygpid);
This page took 0.035464 seconds and 5 git commands to generate.