* bsd_mutex.cc (_msleep): Whitespace fix.
* process.cc (process::process): Handle invalid signal_arrived values more gracefully.
This commit is contained in:
parent
d0bed66e45
commit
c9f545e20f
@ -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>
|
2004-12-30 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* bsd_mutex.cc: Include limits.h.
|
* bsd_mutex.cc: Include limits.h.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* bsd_mutex.cc
|
/* bsd_mutex.cc
|
||||||
|
|
||||||
Copyright 2003, 2004 Red Hat Inc.
|
Copyright 2003, 2004, 2005 Red Hat Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ _msleep (void *ident, struct mtx *mtx, int priority,
|
|||||||
if ((priority & PCATCH)
|
if ((priority & PCATCH)
|
||||||
&& td->client->signal_arrived () != INVALID_HANDLE_VALUE)
|
&& td->client->signal_arrived () != INVALID_HANDLE_VALUE)
|
||||||
obj_cnt = 4;
|
obj_cnt = 4;
|
||||||
|
|
||||||
switch (WaitForMultipleObjects (obj_cnt, obj, FALSE, timo ?: INFINITE))
|
switch (WaitForMultipleObjects (obj_cnt, obj, FALSE, timo ?: INFINITE))
|
||||||
{
|
{
|
||||||
case WAIT_OBJECT_0: /* wakeup() has been called. */
|
case WAIT_OBJECT_0: /* wakeup() has been called. */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* process.cc
|
/* 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>
|
Written by Robert Collins <rbtcollins@hotmail.com>
|
||||||
|
|
||||||
@ -60,13 +60,17 @@ process::process (const pid_t cygpid, const DWORD winpid, HANDLE signal_arrived)
|
|||||||
else
|
else
|
||||||
debug_printf ("got handle %p for new cache process %d(%lu)",
|
debug_printf ("got handle %p for new cache process %d(%lu)",
|
||||||
_hProcess, _cygpid, _winpid);
|
_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,
|
if (!DuplicateHandle (_hProcess, signal_arrived,
|
||||||
GetCurrentProcess (), &_signal_arrived,
|
GetCurrentProcess (), &_signal_arrived,
|
||||||
0, FALSE, DUPLICATE_SAME_ACCESS))
|
0, FALSE, DUPLICATE_SAME_ACCESS))
|
||||||
system_printf ("error getting signal_arrived to server (%lu)",
|
system_printf ("error getting signal_arrived to server (%lu)",
|
||||||
GetLastError ());
|
GetLastError ());
|
||||||
|
_signal_arrived = INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
InitializeCriticalSection (&_access);
|
InitializeCriticalSection (&_access);
|
||||||
debug ("initialized (%lu)", _cygpid);
|
debug ("initialized (%lu)", _cygpid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user