* sigproc.cc (wait_sig): Avoid uninitialized use of nb when retrying.
Consolidate two error messages into one.
This commit is contained in:
parent
5e31c80e4e
commit
6fcb223858
@ -1,9 +1,14 @@
|
|||||||
|
2013-03-29 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
|
* sigproc.cc (wait_sig): Avoid uninitialized use of nb when retrying.
|
||||||
|
Consolidate two error messages into one.
|
||||||
|
|
||||||
2013-03-28 Christopher Faylor <me.cygwin2013@cgf.cx>
|
2013-03-28 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
* sigproc.cc (pending_signals::retry): Declare new element.
|
* sigproc.cc (pending_signals::retry): Declare new element.
|
||||||
(pending_signals::pending): Force an additional loop through wait_sig
|
(pending_signals::pending): Force an additional loop through wait_sig
|
||||||
by setting retry whenever this function is called.
|
by setting retry whenever this function is called.
|
||||||
(sig_send): Reorganize to wait for SIGHOLD at bottom. Always add
|
(wait_sig): Reorganize to wait for SIGHOLD at bottom. Always add
|
||||||
signal to pending queue and work on whole queue rather than just the
|
signal to pending queue and work on whole queue rather than just the
|
||||||
one signal. Loop when sigq.retry is set. Fix long-broken check for
|
one signal. Loop when sigq.retry is set. Fix long-broken check for
|
||||||
SIGCHLD after queued signals.
|
SIGCHLD after queued signals.
|
||||||
|
@ -1288,27 +1288,16 @@ wait_sig (VOID *)
|
|||||||
DWORD nb;
|
DWORD nb;
|
||||||
sigpacket pack = {};
|
sigpacket pack = {};
|
||||||
if (sigq.retry)
|
if (sigq.retry)
|
||||||
{
|
pack.si.si_signo = __SIGFLUSH;
|
||||||
sigq.retry = false;
|
|
||||||
pack.si.si_signo = __SIGFLUSH;
|
|
||||||
}
|
|
||||||
else if (!ReadFile (my_readsig, &pack, sizeof (pack), &nb, NULL))
|
else if (!ReadFile (my_readsig, &pack, sizeof (pack), &nb, NULL))
|
||||||
Sleep (INFINITE); /* Never exit this thread */
|
Sleep (INFINITE); /* Assume were exiting. Never exit this thread */
|
||||||
if (nb != sizeof (pack))
|
else if (nb != sizeof (pack) || !pack.si.si_signo)
|
||||||
{
|
{
|
||||||
system_printf ("short read from signal pipe: %d != %d", nb,
|
system_printf ("garbled signal pipe data nb %u, sig %d", nb, pack.si.si_signo);
|
||||||
sizeof (pack));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pack.si.si_signo)
|
|
||||||
{
|
|
||||||
#ifdef DEBUGGING
|
|
||||||
system_printf ("zero signal?");
|
|
||||||
#endif
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sigq.retry = false;
|
||||||
/* Don't process signals when we start exiting */
|
/* Don't process signals when we start exiting */
|
||||||
if (exit_state > ES_EXIT_STARTING && pack.si.si_signo > 0)
|
if (exit_state > ES_EXIT_STARTING && pack.si.si_signo > 0)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user