Re: paccept() oddity

From: Roland McGrath
Date: Wed Sep 10 2008 - 20:39:55 EST

I don't see any rationale for changing paccept to be an oddball special
case in its EINTR behavior.

select/poll are special cases historically, and that's why the principle of
least astonishment makes it best for pselect/ppoll to match their behavior.

The same principle makes it highly dubious to have paccept differ from
accept in such a subtlety. I don't see any reason to want it, anyway.
An application that wants to see EINTR can just use sigaction to clear

Frankly, I don't see the rationale for rolling the implicit sigprocmask
into paccept at all. accept is analogous to read or other i/o calls,
not to select/poll. It's not any normal plan to fiddle blocked signals
around a blocking i/o call. Instead, programs use (p)select/poll (and
sometimes also O_NONBLOCK) to manage the blocking and waking up. Then
when the program finally calls accept, it knows it won't block. The
atomic signal machinery makes sense for pselect/ppoll to help manage the
corner cases of blocking/wakeup in event loops. It makes no more sense
to roll blocked signal set changes into accept than it would to have
read, write, etc. all take a sigset_t and do that.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at