WG15 Defect Report Ref: 9945-2-74
Topic: rm exit status


This is an approved interpretation of 9945-2:1993.

.

Last update: 1997-05-20


								9945-2-74

 _____________________________________________________________________________

	Topic:			rm exit status
	Relevant Sections:	4.53


Defect Report:
-----------------------


Date: Fri, 2 Sep 1994 13:16:36 -0700
From: Fred Zlotnick <[email protected]>



I would like to an request official, binding interpretation from the
WG15 concerning the following point in ISO/IEC 9945-2:1993 (POSIX.2).

POSIX.2 Subclause 4.53 specifies the semantics of the "rm" utility.  My
question has to do with the correct behavior of "rm" when it is applied
to an ordinary file that has no write permission, when standard input is
a terminal.  If file Foo has mode r--r--r-- (i.e., is not writeable),
and the command

	rm Foo

is issued, and the user, in response to a prompt asking if the file should
be reomved, responds negatively, then what value should the exit status have?

My reading of the standard (subclause 4.53.8) is that it should be
nonzero.  However, I note that existing practice on all the systems to
which I have access is to exit with status zero under these
circumstances.  Was it the intent of the committee to change the
semantics from existing practice?

Thank you for your attention to this matter.
Interpretation Response:
------------------------


The standard states the behaviour for rm, and conforming implementations must 
conform to this. However, concerns have been raised about this which are 
being referred to the sponsor.

Rationale
-------------
None.
Forwarded to Interpretations group: 4 Sep 94


Proposed resolution sent for review: 19th Nov 94
Resolved: 10th Dec 94