Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2015 14:30:35 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 197567] chflags -f argument ignored when no file found to be modified
Message-ID:  <bug-197567-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: jesco.freund@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197567-8>