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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ulrich Drepper wrote:

Manfred Spraul wrote:
1) I would go further and try ERESTARTSYS: ERESTARTSYS means that the
kernel signal handler honors SA_RESTART
2) At least for the futex functions, it won't be as easy as replacing
EINTR wiht ERESTARTSYS: the futex functions receive a timeout a the
parameter, with the duration of the wait call as a parameter. You must
use ERESTART_RESTARTBLOCK.

Whoa, not so fast.  At least the futex syscall but be interruptible by
signals.  It is crucial to return EINTR.

Yes, of course.
ERESTARTSYS means honor SA_RESTART.
EINTR means return from the syscall, even if SA_RESTART is set in the signal handler.

Is it necessary that the futex syscall ignores SA_RESTART?

--
   Manfred


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux