diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-04-17 19:33:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-04-17 19:33:55 +0000 |
commit | a9073e9adc8f80fbe2d95c07c2e615903c061d05 (patch) | |
tree | d0afcaf6cf4aa800388ee5589f24b0a59a890fe6 /sbin/fsck_ffs | |
parent | d7a6a24f20a97b1ea77b0ede97ceefc63c36c966 (diff) |
more signal handler cleaning
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r-- | sbin/fsck_ffs/utilities.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c index 1cf21a98a53..587cdeeddd6 100644 --- a/sbin/fsck_ffs/utilities.c +++ b/sbin/fsck_ffs/utilities.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utilities.c,v 1.29 2006/04/17 19:22:29 deraadt Exp $ */ +/* $OpenBSD: utilities.c,v 1.30 2006/04/17 19:33:54 deraadt Exp $ */ /* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: utilities.c,v 1.29 2006/04/17 19:22:29 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: utilities.c,v 1.30 2006/04/17 19:33:54 deraadt Exp $"; #endif #endif /* not lint */ @@ -475,8 +475,9 @@ getpathname(char *namebuf, size_t namebuflen, ino_t curdir, ino_t ino) memcpy(namebuf, cp, (size_t)(&namebuf[MAXPATHLEN] - cp)); } +/*ARGSUSED*/ void -catch(int n) +catch(int signo) { if (!doinglevel2) ckfini(0); /* XXX signal race */ @@ -488,8 +489,9 @@ catch(int n) * a special exit after filesystem checks complete * so that reboot sequence may be interrupted. */ +/*ARGSUSED*/ void -catchquit(int n) +catchquit(int signo) { extern volatile sig_atomic_t returntosingle; char buf[1024]; @@ -505,13 +507,16 @@ catchquit(int n) * Ignore a single quit signal; wait and flush just in case. * Used by child processes in preen. */ +/*ARGSUSED*/ void -voidquit(int n) +voidquit(int signo) { + int save_errno = errno; sleep(1); (void)signal(SIGQUIT, SIG_IGN); (void)signal(SIGQUIT, SIG_DFL); + errno = save_errno; } /* |