diff options
author | Roland McGrath <roland@gnu.org> | 2002-08-27 02:43:22 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-08-27 02:43:22 +0000 |
commit | b5d482d00ef8bc29f0b4dd84812d52759ebdd630 (patch) | |
tree | 95299ffce18eb88410cc0d49cc898a9fd40cc302 /sysdeps/posix/sigvec.c | |
parent | 20acbc25428bb7c9a78de37236285a09108da313 (diff) | |
download | glibc-b5d482d00ef8bc29f0b4dd84812d52759ebdd630.tar glibc-b5d482d00ef8bc29f0b4dd84812d52759ebdd630.tar.gz glibc-b5d482d00ef8bc29f0b4dd84812d52759ebdd630.tar.bz2 glibc-b5d482d00ef8bc29f0b4dd84812d52759ebdd630.zip |
* sysdeps/generic/sigset-cvt-mask.h (sigset_set_old_mask): Replace
macro with inline function.
(sigset_get_old_mask): Likewise.
* sysdeps/posix/sigblock.c (__sigblock): Update callers.
* sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise.
* sysdeps/posix/sigpause.c (__sigpause): Likewise.
* sysdeps/posix/sigvec.c (__sigvec, sigvec_wrapper_handler): Likewise.
* sysdeps/unix/sysv/aix/sigset-cvt-mask.h
(sigset_set_old_mask, sigset_get_old_mask): Make these macros return
values.
* sysdeps/unix/sysv/linux/sigset-cvt-mask.h: Likewise.
* sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h: Likewise.
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/generic/sigset-cvt-mask.h (sigset_set_old_mask,
sigset_get_old_mask): Make it work with larger sigset_t.
* sysdeps/posix/sigblock.c (__sigblock): Use those macros.
* sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise.
* sysdeps/posix/sigpause.c (__sigpause): Likewise.
2002-08-26 Roland McGrath <roland@redhat.com>
Diffstat (limited to 'sysdeps/posix/sigvec.c')
-rw-r--r-- | sysdeps/posix/sigvec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/posix/sigvec.c b/sysdeps/posix/sigvec.c index d5f7ccdb4a..d1b80e297a 100644 --- a/sysdeps/posix/sigvec.c +++ b/sysdeps/posix/sigvec.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ #include <stddef.h> /* Include macros to convert between `sigset_t' and old-style mask. */ -#include "sigset-cvt-mask.h" +#include <sigset-cvt-mask.h> /* We use a wrapper handler to support SV_RESETHAND. */ struct sigvec_wrapper_data @@ -80,7 +80,8 @@ __sigvec (sig, vec, ovec) #endif n = &new; new.sa_handler = handler; - sigset_set_old_mask (&new.sa_mask, mask); + if (sigset_set_old_mask (&new.sa_mask, mask) < 0) + return -1; new.sa_flags = sa_flags; } @@ -122,7 +123,7 @@ __sigvec (sig, vec, ovec) /* should we use data->sw_mask?? */ sv_flags |= SV_RESETHAND; } - sigset_get_old_mask (&old.sa_mask, mask); + mask = sigset_get_old_mask (&old.sa_mask); #ifdef SA_ONSTACK if (sa_flags & SA_ONSTACK) sv_flags |= SV_ONSTACK; @@ -147,19 +148,18 @@ sigvec_wrapper_handler (sig) int sig; { struct sigvec_wrapper_data *data; - unsigned int mask; struct sigaction act; int save; __sighandler_t handler; data = &sigvec_wrapper_data[sig]; - mask = data->sw_mask; act.sa_handler = SIG_DFL; - sigset_set_old_mask (&act.sa_mask, mask); act.sa_flags = 0; - save = errno; + sigset_set_old_mask (&act.sa_mask, data->sw_mask); handler = data->sw_handler; + save = errno; (void) __sigaction (sig, &act, (struct sigaction *) NULL); __set_errno (save); + (*handler) (sig); } |