[File] [PATCH] handle full disk space errors as failure

Dirk Müller dirk at dmllr.de
Thu Mar 17 21:13:49 UTC 2022

do a final fflush of stdout even in buffered mode
so that a ENOSPACE is caught and propagated as an exit
code 1 so that the surrounding logic can detect and
handle it as a failure rather than silently misbehaving.

reproducer is

file somefile > /dev/full && echo exit code was 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-handle-full-disk-space-errors-as-failure.patch
Type: text/x-patch
Size: 1672 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220317/a6825ded/attachment.bin>

More information about the File mailing list