https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229616
Bug ID: 229616 Summary: bin/dd does not check output's close() return code Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: b...@freebsd.org Reporter: t...@hur.st In dd's main(): 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); dd_close() comments *claim* it flushes output, but this appears to be a lie - it just finishes off any pending calls to write(), it doesn't ask they be flushed to disk. IO errors from previous writes that were later flushed to disk can end up reported in close(), for example as mentioned in close(2): [ENOSPC] The underlying object did not fit, cached data was lost Obviously a dd that can exit 0 while also losing data is.. unfortunate. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"