[Bug 197567] chflags -f argument ignored when no file found to be modified
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Feb 12 14:30:35 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197567
Bug ID: 197567
Summary: chflags -f argument ignored when no file found to be
modified
Product: Base System
Version: 10.1-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: jesco.freund at my-universe.com
According to the chflags(1) manual page, the -f argument should prevent chflags
from printing any message to stderr and from modifying its exit status.
However, when called with a a pattern not delivering any files, chflags will
still exit with status 1 and print "chflags: No match." to stderr.
This behaviour can be reproduced:
#~ mkdir test
#~ /bin/chflags -f noschg test/*
chflags: No match.
#~ echo $?
1
Suggested fix:
Either change behaviour of chflags to silently exit with status 0 when an empty
set of files is supplied (if called with the -f flag, of course) - or update
man page to document the current behaviour correctly.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list