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 PID of the process sending the signal. I tried in a very
> simple code to obtain the PID of the child process but si_pid member
> always contains 0 when I print it, and don't know what's wrong with it.

The si_pid is not generally reliable, so it's a good idea not to use
it.  What happens if two processes send the same signal before you
receive it?

Reply via email to