Re: [BUG] 2.6.22-rc4: wait4() waiting for SIGSTOP may not return if the target process is ptraced
From: Roland McGrath
Date: Wed Jun 13 2007 - 16:20:48 EST
> > The bug is in strace (and is being fixed). It needs to use tgkill instead
> > of kill to send that SIGSTOP to the right thread only.
>
> You mean kill() to specifig thread is fundamentally wrong? If so, current
> kill() is wrong because it can receive pid of non main thread.
The kill call should only be used on process IDs (tgid in linuspeak). This
is what POSIX defines it for. I'm not sure off hand if it's technically a
violation of POSIX that it works for numbers that aren't a POSIX process ID
(aka tgid) but happen happen to be a Linux thread ID (aka pid).
Thanks,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/