In POSIX, select/pselect is specifically exempted from the usual SA_RESTART
behavior. I'm not really sure if that is entirely historical or because
after a handler has run even an adjusted relative timeout may no longer be
what you actually want. There is no such exemption for poll/ppoll, though
On 08/03, Chris Wright wrote:
>
> +long do_restart_poll(struct restart_block *restart_block)
> +{
> + struct pollfd __user *ufds = (struct pollfd __user*)restart_block->arg0;
> + int nfds = restart_block->arg1;
> + s64 timeout = ((s64)restart_block->arg3<<32) | (s64)restart_block->arg2;
* Oleg Nesterov ([EMAIL PROTECTED]) wrote:
> What we need is ERESTART_RESTARTBLOCK, and restart_block.arg2 should
> have the new timeout value, which takes the time we already slept
> into account.
This passes my simple 32-bit and 64-bit testing. See any issues with
this one?
thanks,
-chris
--
On 07/31, Manfred Spraul wrote:
>
> Mainline has the same problem: poll() returns to user space if it's
> interrupted by SIGSTOP/SIGCONT.
> >I guess the consequences of the thing-which-this-fixes aren't huge, s I ca
> >queue this up for 2.6.24, after Oleg's
> >do_poll-return-eintr-when-signalled.p
Andrew Morton wrote:
On Sun, 29 Jul 2007 19:05:05 +0200
Manfred Spraul <[EMAIL PROTECTED]> wrote:
Hi Andrew,
poll() returns -EINTR if a signal is pending.
EINTR is a bad choice: it means that poll returns to user space if the
task is stopped by SIGSTOP/SIGCONT or by the freezer.
select() an
* Oleg Nesterov ([EMAIL PROTECTED]) wrote:
> > I am not sure. This means we restart sys_poll() with the same timeout
> > if there is no pending signal. I think we need ERESTART_RESTARTBLOCK
> > logic.
>
> Forgot to mention, sys_select() can use ERESTARTNOHAND because it
> modifies "struct timeval
On 07/31, Oleg Nesterov wrote:
>
> > Manfred Spraul <[EMAIL PROTECTED]> wrote:
> >
> > > poll() returns -EINTR if a signal is pending.
> > > EINTR is a bad choice: it means that poll returns to user space if the
> > > task is stopped by SIGSTOP/SIGCONT or by the freezer.
> > > select() and ppoll()
On 07/30, Andrew Morton wrote:
>
> On Sun, 29 Jul 2007 19:05:05 +0200
> Manfred Spraul <[EMAIL PROTECTED]> wrote:
>
> > Hi Andrew,
> >
> > poll() returns -EINTR if a signal is pending.
> > EINTR is a bad choice: it means that poll returns to user space if the
> > task is stopped by SIGSTOP/SIGCON
* Andrew Morton ([EMAIL PROTECTED]) wrote:
> On Sun, 29 Jul 2007 19:05:05 +0200 Manfred Spraul <[EMAIL PROTECTED]> wrote:
> > poll() returns -EINTR if a signal is pending.
> > EINTR is a bad choice: it means that poll returns to user space if the
> > task is stopped by SIGSTOP/SIGCONT or by the fre
* Manfred Spraul ([EMAIL PROTECTED]) wrote:
> poll() returns -EINTR if a signal is pending.
> EINTR is a bad choice: it means that poll returns to user space if the
> task is stopped by SIGSTOP/SIGCONT or by the freezer.
> select() and ppoll() both use ERESTARTNOHAND, this avoids a return to
> user
On Sun, 29 Jul 2007 19:05:05 +0200
Manfred Spraul <[EMAIL PROTECTED]> wrote:
> Hi Andrew,
>
> poll() returns -EINTR if a signal is pending.
> EINTR is a bad choice: it means that poll returns to user space if the
> task is stopped by SIGSTOP/SIGCONT or by the freezer.
> select() and ppoll() both
11 matches
Mail list logo