From 7a507517ded561de3634986d2eec023d8a924fae Mon Sep 17 00:00:00 2001 From: Dima Dorfman Date: Mon, 25 Jun 2001 06:17:02 +0000 Subject: [PATCH] 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 --- bin/dd/misc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/dd/misc.c b/bin/dd/misc.c index 4fe4a41b78f1..296a01868a92 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); }