Hello!

> I believe I've found an inconsistency between the behaviour of poll(2)
> and select(2); select() is restartable in the face of signals
> (sys_select() returns ERESTARTNOHAND if a signal is pending), whilst
> poll() is not (sys_poll() returns EINTR).

poll() cannot be restarted.

select() can, because state of timer is remembered.


> breaking code (or at least breaking code that expects BSD signal
> behaviour as the default,

BSD behaviour is never to restart select() (because BSD does
not update timer, it is the only possible behaviour there, otherwise
select can never terminate). Its restart in some rare cases
(when signal happens to be ignored) is small optimization,
specific only to Linux.


> which I believe is also the POSIX

Seems, POSIX behaviour is not to restart any syscall.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to