diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-17 19:48:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-17 19:48:41 +0000 |
commit | 9f1c4df33671852145229625578d31837675ae6a (patch) | |
tree | 2ba23683972d148d500bebf9890414c2348c9fb3 /usr.sbin/cron | |
parent | d2d496a9829c6ae31210332b754c970e30376168 (diff) |
save errno in signal handler
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r-- | usr.sbin/cron/crontab.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c index e3cc15b630a..a2b7da5bf7a 100644 --- a/usr.sbin/cron/crontab.c +++ b/usr.sbin/cron/crontab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crontab.c,v 1.23 2001/10/24 17:28:16 millert Exp $ */ +/* $OpenBSD: crontab.c,v 1.24 2001/11/17 19:48:40 deraadt Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved */ @@ -21,7 +21,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$OpenBSD: crontab.c,v 1.23 2001/10/24 17:28:16 millert Exp $"; +static char rcsid[] = "$OpenBSD: crontab.c,v 1.24 2001/11/17 19:48:40 deraadt Exp $"; #endif /* crontab - install and manage per-user crontab files @@ -686,10 +686,13 @@ static void clean_turds(signo) int signo; { + int save_errno = errno; + if (TempFilename[0]) (void) unlink(TempFilename); if (signo) { (void) signal(signo, SIG_DFL); (void) raise(signo); } + errno = save_errno; } |