Re: [PATCH] Restartable poll(2)

From: Alan Cox
Date: Mon Jan 17 2005 - 08:34:06 EST


On Llu, 2005-01-17 at 02:31, Naoaki Maeda wrote:
> Hi,
>
> Does nobody think a system call is interrupted by SIGSTOP is
> strange behaviour?

Not really

> According to the man page, both of poll(2) and select(2) can be
> interrupted by signals, but select(2) interrupted by SIGSTOP is
> automatically restarted, and poll(2) isn't.

Correct - select and poll come from different worlds with different
viewpoints on signal behaviour.

> If it is a specification of Linux, using job control or ptrace()
> isn't safe because it changes the behaviour of target programs.

Programs must always deal with system call -EINTR responses
appropriately.

-
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/