diff options
author | dd <dd@FreeBSD.org> | 2001-06-25 06:17:02 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-06-25 06:17:02 +0000 |
commit | 3dc2f99bef0f4786b46d8d049bfffaceaf577ced (patch) | |
tree | 684e4234aef41920a6b6d81ec5249e640bcd8169 /bin/dd | |
parent | eb1ff0cc22d9a440d73dd6f14c49440b0f8fa972 (diff) | |
download | FreeBSD-src-3dc2f99bef0f4786b46d8d049bfffaceaf577ced.zip FreeBSD-src-3dc2f99bef0f4786b46d8d049bfffaceaf577ced.tar.gz |
Previous commit broke dd(1)'s I/O summary when it's terminated by a
signal. Fix it by adding an explicit call to summary() in terminate()
(it was previously called implicitly by exit() because summary() was
registered with atexit()). summary() is supposed to be signal-safe--
it handles SIGINFO almost exclusively--so this should be safe.
Submitted by: bde
Diffstat (limited to 'bin/dd')
-rw-r--r-- | bin/dd/misc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/dd/misc.c b/bin/dd/misc.c index 4fe4a41..296a018 100644 --- a/bin/dd/misc.c +++ b/bin/dd/misc.c @@ -104,5 +104,6 @@ terminate(sig) int sig; { + summary(); _exit(sig == 0 ? 0 : 1); } |