summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2004-01-02 00:38:42 +0000
committerDavid Xu <davidxu@FreeBSD.org>2004-01-02 00:38:42 +0000
commitac4476923c1a152ebd1c73f84dc6737a71d7276d (patch)
tree4f986b8e8bfe7bdfc35dd8f7d1d582ae4b10e229 /lib/libpthread
parentf9091138193b3281168c7bf955ef010a0e6fe947 (diff)
Notes
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/thread/thr_sigaltstack.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_sigaltstack.c b/lib/libpthread/thread/thr_sigaltstack.c
index 8a4a4577c88f..3153ebd378df 100644
--- a/lib/libpthread/thread/thr_sigaltstack.c
+++ b/lib/libpthread/thread/thr_sigaltstack.c
@@ -70,16 +70,19 @@ _sigaltstack(stack_t *_ss, stack_t *_oss)
if (_ss != NULL) {
if (oonstack) {
_kse_critical_leave(crit);
- return (EPERM);
+ errno = EPERM;
+ return (-1);
}
if ((ss.ss_flags & ~SS_DISABLE) != 0) {
_kse_critical_leave(crit);
- return (EINVAL);
+ errno = EINVAL;
+ return (-1);
}
if (!(ss.ss_flags & SS_DISABLE)) {
if (ss.ss_size < MINSIGSTKSZ) {
_kse_critical_leave(crit);
- return (ENOMEM);
+ errno = ENOMEM;
+ return (-1);
}
curthread->sigstk = ss;
} else {