diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-23 18:49:20 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-23 18:49:20 +0000 |
commit | 9252e832086e34242cd5d7ba856f00ef016dc852 (patch) | |
tree | 8bc6f04b776ffc79c442dd0cfb42ba91a04844d0 /sbin/dump | |
parent | a8de16afff4ff24adefd1c8c4759688778f89fdd (diff) |
"caught" should be volatile sig_atomic_t; lukem@netbsd.org
Also mark tperror handler as unsafe; dump needs a signal safety overhaul.
Diffstat (limited to 'sbin/dump')
-rw-r--r-- | sbin/dump/tape.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index 392c0afbe96..ee3594f1f2f 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tape.c,v 1.22 2005/01/23 18:33:12 millert Exp $ */ +/* $OpenBSD: tape.c,v 1.23 2005/01/23 18:49:19 millert Exp $ */ /* $NetBSD: tape.c,v 1.11 1997/06/05 11:13:26 lukem Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.2 (Berkeley) 3/17/94"; #else -static const char rcsid[] = "$OpenBSD: tape.c,v 1.22 2005/01/23 18:33:12 millert Exp $"; +static const char rcsid[] = "$OpenBSD: tape.c,v 1.23 2005/01/23 18:49:19 millert Exp $"; #endif #endif /* not lint */ @@ -119,7 +119,7 @@ static int tapea_volume; /* value of spcl.c_tapea at volume start */ int master; /* pid of master, for sending error signals */ int tenths; /* length of tape used per block written */ -static int caught; /* have we caught the signal to proceed? */ +static volatile sig_atomic_t caught; /* have we caught the signal to proceed? */ int alloctape(void) @@ -201,6 +201,7 @@ int nogripe = 0; void tperror(int signo) { + /* XXX - signal races */ if (pipeout) { msg("write error on %s\n", tape); |