in reply to Re: rsh <defunct> processes appear when using fork and system calls
in thread rsh <defunct> processes appear when using fork and system calls

But this is what I do with the 'waitpid' function. In the child signal handler:

while(($dead_kid = waitpid(-1, WNOHANG)) > 0)

This is what is recommended in O'Reily. If this is incorrect could you give a short example?

Also, I want to emphasize that these defunct processes do not accumulate. That is they are removed after I delete the child pids in the script. This seems to indicate that they are becoming defunct when the child makes the system call to issue rsh (?). And after the child finishes, these 'rsh <defunct>' processes disappear. Strange, No?

Thanks! Ed

  • Comment on Re^2: rsh <defunct> processes appear when using fork and system calls
  • Download Code