This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: -1 pid on sys.wait4?
So, yes, dumb question. :) (sorry...confused myself between $pid and pid())
Thanks,
Nick
On Nov 9, 2012, at 2:59 PM, Josh Stone <jistone@redhat.com> wrote:
> 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.