diff --git a/bin/dd/dd.c b/bin/dd/dd.c index e3916fe7dcc0..64484bd7d564 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -124,7 +124,8 @@ main(int argc __unused, char *argv[]) * descriptor explicitly so that the summary handler (called * from an atexit() hook) includes this work. */ - close(out.fd); + if (close(out.fd) == -1 && errno != EINTR) + err(1, "close"); exit(0); }