Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PH7PR11MB579568461349A889055E73E1B388A@PH7PR11MB5795.namprd11.prod.outlook.com>
Date: Wed, 7 May 2025 03:03:15 +0000
From: "Zhao, Lihua (CN)" <Lihua.Zhao.CN@...driver.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: sigtimedwait always retry when receive -EINTR

Current sigtimedwait code:

int sigtimedwait(const sigset_t *restrict mask, siginfo_t *restrict si, const struct timespec *restrict timeout)
{
    int ret;
    do ret = do_sigtimedwait(mask, si, timeout);
    while (ret==-EINTR);
    return __syscall_ret(ret);
}

sigtimedwait always retry when receive -EINTR, it conflicts with https://pubs.opengroup.org/onlinepubs/9799919799/

[EINTR]
The wait was interrupted by an unblocked, caught signal. It shall be documented in system documentation whether this error causes these functions to fail.

With above implementation, sigtimedwait will dead loop to wait expected signal.

>From the git log, this design is for sigwait which doesn't allow EINTR, so the EINTR check is more appropriate to do in sigwait, right?

Best Regards,
Lihua Zhao


Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.