mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC: Kill -ERESTART_RESTARTBLOCK.
Date: Fri, 25 Nov 2005 16:44:06 +0000	[thread overview]
Message-ID: <1132937046.21643.127.camel@hades.cambridge.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0511251602460.1609@scrub.home>

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


      reply	other threads:[~2005-11-25 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-24 19:08 David Woodhouse
2005-11-25  1:08 ` Roman Zippel
2005-11-25 11:53   ` David Woodhouse
2005-11-25 15:24     ` Roman Zippel
2005-11-25 16:44       ` David Woodhouse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1132937046.21643.127.camel@hades.cambridge.redhat.com \
    --to=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®