Re: signal vs. sigaction and SIGCHLD

2013-05-21 Thread vilibald wanca
Doesn't wait call suspend the calling process until the child is terminated? From man page for wait: The wait() function suspends execution of its calling process until status information is available for a terminated child process But in your case the child process is not terminated. If

signal vs. sigaction and SIGCHLD

2013-05-20 Thread Noel Hunt
I have a small test program which simply forks and execs its command line arguments, but after the fork and before the exec, it sends a SIGSTOP to the child. The parent then sleeps for 3 seconds before exiting. However, a signal handler for SIGCHLD has been installed and I was expecting the parent

Re: signal vs. sigaction and SIGCHLD

2013-05-20 Thread Polytropon
On Tue, 21 May 2013 15:24:26 +1000, Noel Hunt wrote: If I recompile with `#undef SIGACTION', waithandler is not called. I should add that even with the sigaction(2) interface, without the `sigprocmask' call, it still doesn't work, which suggests that SIGCHLD is being blocked. Can anyone