When strace is used, waitpid() does not return immediately even if child processes has already changed state.

Solution Verified - Updated -

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.