Re: Strange Linux behaviour with blocking syscalls and stop signals+SIGCONT

From: Ulrich Drepper
Date: Fri Jul 07 2006 - 09:35:29 EST


Jakub Jelinek wrote:
> In futex(2) case (except FUTEX_LOCK_PI where we want it to be restartable),
> getting EINTR rather than the getting the syscall restarted is very
> desirable though and several NPTL routines rely on it.

Jakub, you're slightly missing the point. Restartable means the only if
SA_RESTART is set the syscall restarts. Otherwise it returns. That
should always be the behavior if EINTR is an acceptable error.

The difference for the _PI operations is that be never need to see EINTR
errors. I.e., the syscall should _always_ restart, regardless of
SA_RESTART. That's not done using the error code but through explicit
programming. I told Ingo that we don't need EINTR for those operations
and I hope that part is still in.

--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature