Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to reap defunct processes/threads when spawned by a thread

952982Jul 31 2012 — edited Aug 2 2012
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2012
Added on Jul 31 2012
3 comments
416 views