When strace is used, waitpid() does not return immediately even if child processes has already changed state.
Issue
- When a process is traced by using strace, a call of waitpid() from the process does not return immediately even if a child process of the process has already changed its state.
-
This behavior does not match the following description in waitpid(2):
If a child has already changed state, then these calls return immediately.
-
The problem only occurs if strace is used to monitor the child processes, it does not occur if only the main process is monitored.
Environment
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- strace
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.