Hello,
I'd like to know the reason defunct processes are caused.
We have defunct processes being caused because of the following logic
Use vfork to create child process
The child process uses execlp to launch a seperate binary.
The parent process waits in a loop and calls waitpid() to determine if
the child process has terminated.
If the child process has not terminated in a predefined time interval
the parent process issues a kill -15 signal to kill the child process.
We observed that the child process thus killed leaves a trail of a
defunct process.
The parent process did not have a signal handler to trap any signals
from this errant child process. Could this be a problem.
Could some one explain why this could be happening and how can I solve
this issue.
Thank you in advance
Maya