The POSIX spec also requires that kern_sigtimedwait return

EINVAL if tv_nsec of the timeout is less than zero.
This commit is contained in:
Mike Makonnen 2003-07-24 17:07:17 +00:00
parent 80366b6d6a
commit a6ca48085c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117972

View File

@ -911,7 +911,7 @@ kern_sigtimedwait(struct thread *td, sigset_t waitset, siginfo_t *info,
if (timeout) {
struct timeval tv;
if (timeout->tv_nsec > 1000000000) {
if (timeout->tv_nsec < 0 || timeout->tv_nsec > 1000000000) {
error = EINVAL;
goto out;
}