Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   riastradh
Date:           Fri Dec 19 04:40:43 UTC 2025

Modified Files:
        src/sys/kern: sys_sig.c
        src/tests/lib/libc/sys: t_sigtimedwait.c

Log Message:
sigtimedwait(2): Return EINTR, not ECANCELED.

The return value ECANCELED was a vestige of the logic to implement
sigtimedwait(2) in the SA (scheduler activations) era of NetBSD
multithreading.  It was meant to be used purely internally to
libpthread, not meant to leak outside to the caller of
sigtimedwait(2).  But in the removal of SA in the newlock2 branch,
something got lost in translation and we wound up having
sigtimedwait(2) return ECANCELED when it should return EINTR when it
is interrupted by an unblocked signal that was not in the signal set
passed as an argument to wait for.

POSIX.1-2024 sigtimedwait(2) spec:

https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/sigtimedwait.html

PR standards/59586: sigwaitinfo() returns ECANCELED instead of EINTR
- POSIX compliance violation


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/sys_sig.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_sigtimedwait.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index