X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fsignal%2Fsigaction.c;h=05445089f23f3608019db00680a5d74a62fa38e2;hb=0847902ab99065a48f9bd3729b6e676288dfd69e;hp=af47195e001376c2e5e870f410b71ae5f230bb25;hpb=5f12ffe1239a5e4f8d4e98e2dff4e191a71f4693;p=musl diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c index af47195e..05445089 100644 --- a/src/signal/sigaction.c +++ b/src/signal/sigaction.c @@ -21,6 +21,8 @@ void __get_handler_set(sigset_t *set) memcpy(set, handler_set, sizeof handler_set); } +volatile int __eintr_valid_flag; + int __libc_sigaction(int sig, const struct sigaction *restrict sa, struct sigaction *restrict old) { struct k_sigaction ksa, ksa_old; @@ -43,6 +45,10 @@ int __libc_sigaction(int sig, const struct sigaction *restrict sa, struct sigact SIGPT_SET, 0, _NSIG/8); unmask_done = 1; } + + if (!(sa->sa_flags & SA_RESTART)) { + a_store(&__eintr_valid_flag, 1); + } } /* Changing the disposition of SIGABRT to anything but * SIG_DFL requires a lock, so that it cannot be changed