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

Dirk Müller dirk at dmllr.de
Wed Apr 13 20:36:22 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: 1476 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220413/4d226f0b/attachment.bin>

More information about the File mailing list