diff options
author | davidxu <davidxu@FreeBSD.org> | 2004-03-17 02:12:19 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2004-03-17 02:12:19 +0000 |
commit | 12db4373da2db86c53530a377ee958ebcd510a66 (patch) | |
tree | 4602c9096812d8c72954ebf709e25890a96fafcc /lib/libkse | |
parent | fc9687ad3ceb3b017fef0aa4720106a33e4b5733 (diff) | |
download | FreeBSD-src-12db4373da2db86c53530a377ee958ebcd510a66.zip FreeBSD-src-12db4373da2db86c53530a377ee958ebcd510a66.tar.gz |
Fix a POSIX conformance bug. POSIX says sigwait should return error number
in return value not in errno.
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/thread/thr_sigwait.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_sigwait.c b/lib/libkse/thread/thr_sigwait.c index 76f5368..6f60653 100644 --- a/lib/libkse/thread/thr_sigwait.c +++ b/lib/libkse/thread/thr_sigwait.c @@ -178,9 +178,9 @@ __sigwait(const sigset_t *set, int *sig) if (ret > 0) { *sig = ret; ret = 0; + } else { + ret = errno; } - else - ret = -1; _thr_cancel_leave(curthread, 1); return (ret); } @@ -195,7 +195,7 @@ _sigwait(const sigset_t *set, int *sig) *sig = ret; ret = 0; } else { - ret = -1; + ret = errno; } return (ret); } |