This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -1 pid on sys.wait4?


On 11/09/2012 11:53 AM, Nicholas Murphy wrote:
> Maybe a dumb question, but: why would $pid show up as -1 fairly
> consistently in a "probe kernel.function("sys_wait4").call" probe?

Check out "man 2 wait", which says:

  The value of pid can be:

  < -1   meaning  wait for any child process whose process group ID is
         equal to the absolute value of pid.

  -1     meaning wait for any child process.

  0      meaning wait for any child process whose process group ID is
         equal to that of the calling process.

  > 0    meaning wait for the child whose process ID is equal to the
         value of pid.


So it just means that the sys_wait4 caller was not specific about which
child process they're waiting for.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]