summaryrefslogtreecommitdiffstats
path: root/bin/dd/misc.c
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-06-25 06:17:02 +0000
committerdd <dd@FreeBSD.org>2001-06-25 06:17:02 +0000
commit3dc2f99bef0f4786b46d8d049bfffaceaf577ced (patch)
tree684e4234aef41920a6b6d81ec5249e640bcd8169 /bin/dd/misc.c
parenteb1ff0cc22d9a440d73dd6f14c49440b0f8fa972 (diff)
downloadFreeBSD-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/misc.c')
-rw-r--r--bin/dd/misc.c1
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);
}
OpenPOWER on IntegriCloud