From c0a9bffd03e62822959ba8cb0e8b083f1ec4b871 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 1 Sep 2003 02:05:32 +0000 Subject: * cygheap.cc (cygheap_init): Allocate space for sigaction array in cygheap. * cygheap.h (cygheap_types): Add HEAP_SIGS. * exceptions.cc (signal_fixup_after_exec): Remove from this file. * pinfo.h (pinfo::getsig): Just return global_sigs array. (pinfo::sigs): Delete. * sigproc.cc (signal_fixup_after_exec): Move it here. (global_sigs): New global array, moved from pinfo structure. (sigalloc): New function. Allocate global sigaction array here. (proc_subproc): Remove copysigs call. It's automatic now. * include/sys/cygwin.h (PID_NOCLDSTOP): New value. * signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate. * sigproc.h (sigalloc): Declare. * fnmatch.c (fnmatch): Use C90 parameters. (rangematch): Ditto. * fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a compiler warning. --- winsup/cygwin/signal.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'winsup/cygwin/signal.cc') diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index baad718b9..2b890dd62 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -338,6 +338,12 @@ sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact) if (newact->sa_handler == SIG_DFL && sig == SIGCHLD) sig_clear (sig); set_sigcatchers (oa.sa_handler, newact->sa_handler); + if (sig == SIGCHLD) + { + myself->process_state &= ~PID_NOCLDSTOP; + if (newact->sa_flags & SA_NOCLDSTOP); + myself->process_state |= PID_NOCLDSTOP; + } } if (oldact) -- cgit v1.2.3