[File-cvs] CVS commit: file/src

Christos Zoulas christos at zoulas.com
Mon Apr 18 21:42:34 UTC 2022

Module Name:	file
Committed By:	christos
Date:		Mon Apr 18 21:42:34 UTC 2022

Modified Files:
	file/src: file.c

Log Message:
>From Dirk Mueller:
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

Also check printf even if type is null for consistency.

To generate a diff of this commit:
cvs rdiff -r1.192 -r1.193 file/src/file.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the File-cvs mailing list