It would be a bit difficult for two childred to signal each other as they wouldn't know the other's PID. Better to have child and parent handle the two tasks: The parent gets the child's PID from the fork() call, and the child can get the parent's PID using ppid().