How to reap defunct processes/threads when spawned by a thread
952982Jul 31 2012 — edited Aug 2 2012Hi,
We are haveing a situation where a thread spawns another thread and does not join.
The spawned threads results in a defunctt process.
Use of 'pgrep' command is not successful, as it takes the PID of the defunct process which is same as that of the thread that spawned it.
The command returns that the specified process is not defunct (since it may referring to the active thread that spawned the new thread).
Please advise if there is way to reap the above defunct thread/process.
Note, the thread was spawned using pthread_create (and not fork etc.).
Thanks,
Sahil