On Fri, 2005-11-25 at 16:24 +0100, Roman Zippel wrote:
> The arguments have to be saved somewhere, otherwise ERESTARTNOHAND
> wouldn't work, so my basic idea would be to change ERESTART_RESTARTBLOCK
> into ERESTARTNOHAND + some extra state.
That's true; it should probably work.
> > One simpler option which _might_ work for pselect(), ppoll() and
> > sigsuspend() is a TIF_RESTORE_SIGMASK flag which restores the original
> > signal mask on the way back to userspace but _after_ calling do_signal()
> > with the temporary mask.
>
> Now I see the problem with the signal mask and I agree, this would be a
> simpler and IMO preferable approach.
Yes; and its downside (-EINTR even when the signal gets ignored) is
avoided by the above -- or just by using -ERESTARTNOHAND, in fact.
I think I'll use this approach, and probably use -ERESTARTNOHAND in the
first instance. Because ppoll() is going to take a timespec instead of
just an integer for the timeout, we can write back to it as we do for
select, and there shouldn't be a problem restarting.
Thanks.
--
dwmw2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]