NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: standards/38754: /bin/rm rm.c consistancy with other bsds
The following reply was made to PR standards/38754; it has been noted by GNATS.
From: Alan Barrett <apb%cequrux.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: netbsd-bugs%NetBSD.org@localhost
Subject: Re: standards/38754: /bin/rm rm.c consistancy with other bsds
Date: Mon, 2 Jun 2008 00:00:13 +0100
On Mon, 26 May 2008, murray%river-styx.org@localhost wrote:
> rm will display the usage message if there are no file arguments and
> the -f flag is used. This does not follow POSIX. POSIX says...
> "Do not write diagnostic messages or modify the exit status in the
> case of nonexistent operands."
You seem to interpret "nonexistent operands" to mean the number of
operands (not counting options such as the "-f" itself) is zero.
I believe that "nonexistent operands" should be interpreted to mean
operands that contain strings that do not refer to entities that exist
in the file system.
Thus, "rm -f" does not contain any "nonexistent operands"; it contains
no operands at all, and "rm" should print a diagnostic message
complaining about incorrect usage, and exit with an error status.
However, "rm -f /this/file/or/directory/does/not/exist" does contain
a "nonexistent operand", and "rm" should exit without any error or
diagnostic message.
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index