diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2010-07-19 12:41:05 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2010-07-19 12:41:05 +0000 |
| commit | 9ea6d27829195a1d629d8b302afdbaf50237114b (patch) | |
| tree | a67cea5be817e75d7485b180481c90053638b644 /lib/libc | |
| parent | 7be00d5807ff857724f61c50a53b0147d0ef694d (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/compat-43/sigcompat.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/compat-43/sigcompat.c b/lib/libc/compat-43/sigcompat.c index c3ba30a41f40..6841eeb24615 100644 --- a/lib/libc/compat-43/sigcompat.c +++ b/lib/libc/compat-43/sigcompat.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include <sys/param.h> +#include <errno.h> #include <signal.h> #include <string.h> #include "un-namespace.h" @@ -111,9 +112,16 @@ int xsi_sigpause(int sig) { sigset_t set; + int error; - sigemptyset(&set); - sigaddset(&set, sig); + if (!_SIG_VALID(sig)) { + errno = EINVAL; + return (-1); + } + error = _sigprocmask(SIG_BLOCK, NULL, &set); + if (error != 0) + return (error); + sigdelset(&set, sig); return (_sigsuspend(&set)); } |
