Messages in this thread | | | Date | Mon, 16 May 2011 18:04:54 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH UPDATED 8/9] ptrace: move JOBCTL_TRAPPING wait to wait(2) and ptrace_check_attach() |
| |
On 05/16, Tejun Heo wrote: > > On Mon, May 16, 2011 at 02:11:42PM +0200, Oleg Nesterov wrote: > > Anyway, restart_syscall() is not right for do_wait(), especially with the > > next patch. If the caller was woken by the real signal which has a handler, > > we should not restart without SA_RESTART. > > I don't think it really matters and might even be incorrect if we do > that. e.g. we would introduce -EINTR failure to WNOHANG waits.
Agreed.
> The only case that I think of where this could be visible is sleeping > wait(2), checking the state again after being woken up and gets signal > while waiting for TRAPPING. In this case, yeap, we should fail with > -EINTR.
Yes, -EINTR or restart if SA_RESTART.
Oleg.
| |