aboutsummaryrefslogtreecommitdiff
path: root/bin/dd
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2013-04-12 20:48:55 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2013-04-12 20:48:55 +0000
commit69e6d7b75e96c406d072cb83ffc9b26fbf1a86fb (patch)
tree54038c9ac32a45f8741dcc23fb9a8ffc0e15ff89 /bin/dd
parent51048477bcc79bcc8753121ec91c150648df3d1b (diff)
parent8818042ff2ecd155adb5c248a22de2dbe5d9c2a9 (diff)
Notes
Diffstat (limited to 'bin/dd')
-rw-r--r--bin/dd/dd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c
index 637e0cc6cdcfc..01b66fc2d5e54 100644
--- a/bin/dd/dd.c
+++ b/bin/dd/dd.c
@@ -98,6 +98,13 @@ main(int argc __unused, char *argv[])
dd_in();
dd_close();
+ /*
+ * Some devices such as cfi(4) may perform significant amounts
+ * of work when a write descriptor is closed. Close the out
+ * descriptor explicitly so that the summary handler (called
+ * from an atexit() hook) includes this work.
+ */
+ close(out.fd);
exit(0);
}