0

how do i get the child id without calling wait? is there a way to put wait information back so another waitpid can get it...?

void sigchld_handler(int signo) {
  pid_t p = wait(NULL);
  ...
}
2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by Salem
0

AFAIK, you can only wait for each child exactly once.

The process 'stub' the OS keeps around between the end of the child to hold the information you get with 'wait' calls will disappear as soon as that information is delivered to you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.