Date: Sat, 2 Mar 2002 15:38:29 +1100 (EST) From: "Tim J. Robbins" <tim@robbins.dropbear.id.au> To: FreeBSD-gnats-submit@freebsd.org Cc: freebsd-standards@freebsd.org Subject: bin/35471: rm(1) STANDARDS section is incorrect Message-ID: <200203020438.g224cTs11741@descent.robbins.dropbear.id.au>
next in thread | raw e-mail | index | archive | help
>Number: 35471
>Category: bin
>Synopsis: rm(1) STANDARDS section is incorrect
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 01 20:50:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Tim J. Robbins
>Release: FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD descent.robbins.dropbear.id.au 4.5-STABLE FreeBSD 4.5-STABLE #5: Sat Feb 16 18:56:18 EST 2002 tim@descent.robbins.dropbear.id.au:/usr/obj/usr/src/sys/DESCENT i386
>Description:
rm(1) says:
STANDARDS
The rm command is almost IEEE Std 1003.2 (``POSIX.2'') compatible, except
that POSIX requires rm to act like rmdir(1) when the file specified is a
directory. This implementation requires the -d option if such behavior
is desired. This follows the historical behavior of rm with respect to
directories.
However, this is not correct. P1003.2/D11.2, SUSV2 and P1003.1-2001 say
the equivalent of the following (wording is from P1003.1-2001):
2. If file is of type directory, the following steps shall be taken:
a. If neither the -R option nor the -r option is specified, rm shall
write a diagnostic message to standard error, do nothing more with
file, and go on to any remaining files.
This change was added in revision 1.13 to src/bin/rm/rm.1.
>How-To-Repeat:
N/A
>Fix:
This patch, or reverse rev. 1.13.
Index: rm.1
===================================================================
RCS file: /home/ncvs/src/bin/rm/rm.1,v
retrieving revision 1.23
diff -u -r1.23 rm.1
--- rm.1 2001/07/15 07:49:05 1.23
+++ rm.1 2002/03/02 04:34:59
@@ -190,22 +190,8 @@
.Sh STANDARDS
The
.Nm
-command is almost
-.St -p1003.2
-compatible, except that
-.Tn POSIX
-requires
-.Nm
-to act like
-.Xr rmdir 1
-when the
-.Ar file
-specified is a directory. This implementation requires the
-.Fl d
-option if such behavior is desired. This follows the historical
-behavior of
-.Nm
-with respect to directories.
+command conforms to
+.St -p1003.2 .
.Pp
The simplified
.Nm unlink
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203020438.g224cTs11741>
