Forking and catching SIGCHLD, si_pid always contains 0.

2010-05-01 Thread Jesus Sanchez
Hi, using 4.6 release. I'm doing some code on process forking and catching signals on OpenBSD. My interest here is to catch the SIGCHLD signal and do things with the pid which sended the signal on the function called to treat it. As said in Advanced Programming in the Unix Environment

Re: Forking and catching SIGCHLD, si_pid always contains 0.

2010-05-01 Thread Otto Moerbeek
On Sat, May 01, 2010 at 03:59:07PM +0200, Jesus Sanchez wrote: Hi, using 4.6 release. I'm doing some code on process forking and catching signals on OpenBSD. My interest here is to catch the SIGCHLD signal and do things with the pid which sended the signal on the function called to

Re: Forking and catching SIGCHLD, si_pid always contains 0.

2010-05-01 Thread Jesus Sanchez
El 01/05/2010 18:14, Otto Moerbeek escribis: On Sat, May 01, 2010 at 03:59:07PM +0200, Jesus Sanchez wrote: Hi, using 4.6 release. I'm doing some code on process forking and catching signals on OpenBSD. My interest here is to catch the SIGCHLD signal and do things with the pid which

Re: Forking and catching SIGCHLD, si_pid always contains 0.

2010-05-01 Thread Ted Unangst
On Sat, May 1, 2010 at 9:59 AM, Jesus Sanchez zexe...@gmail.com wrote: As said in Advanced Programming in the Unix Environment book, when calling a sigaction function there is a siginfo_t * with data about the process sending the signal. On this struct, the member int si_pid contains the

Re: Forking and catching SIGCHLD, si_pid always contains 0.

2010-05-01 Thread Philip Guenther
On Sat, May 1, 2010 at 2:01 PM, Ted Unangst ted.unan...@gmail.com wrote: On Sat, May 1, 2010 at 9:59 AM, Jesus Sanchez zexe...@gmail.com wrote: As said in Advanced Programming in the Unix Environment book, when calling a sigaction function there is a siginfo_t * with data about the process