diff options
author | 2014-11-14 23:26:34 +0000 | |
---|---|---|
committer | 2014-11-14 23:26:34 +0000 | |
commit | 10f1a6de12fc630aec75de181ded7f0b59d70566 (patch) | |
tree | 2d2325b714e9edd9fc62be55c19130e2c6a45945 /lib/libc/gen/posix_spawn.c | |
parent | simplest free(size) (diff) | |
download | wireguard-openbsd-10f1a6de12fc630aec75de181ded7f0b59d70566.tar.xz wireguard-openbsd-10f1a6de12fc630aec75de181ded7f0b59d70566.zip |
_NSIG is the number of valid signals including signal 0, so it's not a valid
signal number itself. Attempting to reset the signal action for it causes
posix_spawn to fail, making the POSIX_SPAWN_SETSIGDEF flag unusable.
ok guenther@
Diffstat (limited to 'lib/libc/gen/posix_spawn.c')
-rw-r--r-- | lib/libc/gen/posix_spawn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index c3ff251a0be..bd056027b6e 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: posix_spawn.c,v 1.5 2014/09/02 00:21:00 guenther Exp $ */ +/* $OpenBSD: posix_spawn.c,v 1.6 2014/11/14 23:26:34 jmatthew Exp $ */ /*- * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org> * All rights reserved. @@ -124,7 +124,7 @@ process_spawnattr(const posix_spawnattr_t sa) } if (sa->sa_flags & POSIX_SPAWN_SETSIGDEF) { - for (i = 1; i <= _NSIG; i++) { + for (i = 1; i < _NSIG; i++) { if (sigismember(&sa->sa_sigdefault, i)) if (sigaction(i, &sigact, NULL) != 0) return (errno); |