[Bug 197866] FreeBSD 10.1 file(1) utility returns 0 on error

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jul 8 13:44:08 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197866

Glen Barber <gjb at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Closed
         Resolution|---                         |Works As Intended

--- Comment #1 from Glen Barber <gjb at FreeBSD.org> ---
It looks like this is intentional, from upstream file(1)/magic(5).

The '-E' option was added in February 2014, which predates the last file(1)
update, which according to the manual page:

     -E      On filesystem errors (file not found etc), instead of handling
             the error as regular output as POSIX mandates and keep going,
             issue an error message and exit.

It is not clear to me why this change was made, but it appears to be that the
previous '1' exit code observed on the 10.0-RELEASE machine was returned by
stat(2), not file(1).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list