Mercurial > hg > xemacs-beta
diff src/ntproc.c @ 223:2c611d1463a6 r20-4b10
Import from CVS: tag r20-4b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:10:54 +0200 |
parents | 41ff10fd062f |
children | 41f2f0e326e9 |
line wrap: on
line diff
--- a/src/ntproc.c Mon Aug 13 10:10:03 2007 +0200 +++ b/src/ntproc.c Mon Aug 13 10:10:54 2007 +0200 @@ -45,6 +45,7 @@ #include "nt.h" #include "ntheap.h" /* From 19.34.6 */ #include "systime.h" +#include "syssignal.h" #include "syswait.h" #include "process.h" /*#include "w32term.h"*/ /* From 19.34.6: sync in ? --marcpa */ @@ -105,26 +106,7 @@ } #endif -typedef void (_CALLBACK_ *signal_handler)(int); - -/* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ -static signal_handler sig_handlers[NSIG]; - -/* Fake signal implementation to record the SIGCHLD handler. */ -signal_handler -sys_signal (int sig, signal_handler handler) -{ - signal_handler old; - - if (sig != SIGCHLD) - { - errno = EINVAL; - return SIG_ERR; - } - old = sig_handlers[sig]; - sig_handlers[sig] = handler; - return old; -} +/* sys_signal moved to nt.c. It's now called msw_signal... */ /* Defined in <process.h> which conflicts with the local copy */ #define _P_NOWAIT 1 @@ -1205,18 +1187,17 @@ if (cp->fd >= 0 && (fd_info[cp->fd].flags & FILE_AT_EOF) == 0) fd_info[cp->fd].flags |= FILE_SEND_SIGCHLD; /* SIG_DFL for SIGCHLD is ignore */ - else if (sig_handlers[SIGCHLD] != SIG_DFL && - sig_handlers[SIGCHLD] != SIG_IGN) - { + else + { #ifdef FULL_DEBUG - DebPrint (("select calling SIGCHLD handler for pid %d\n", - cp->pid)); + DebPrint (("select is raising SIGCHLD handler for pid %d\n", + cp->pid)); #endif - dead_child = cp; - sig_handlers[SIGCHLD] (SIGCHLD); - dead_child = NULL; - } - } + dead_child = cp; + msw_raise (SIGCHLD); + dead_child = NULL; + } + } else if (fdindex[active] == 0) { /* Keyboard input available */