Subject: bin/20332: rm(1) returns incorrect exit code
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@colwyn.zhadum.de>
List: netbsd-bugs
Date: 02/13/2003 16:27:53
>Number:         20332
>Category:       bin
>Synopsis:       rm(1) returns incorrect exit code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 13 07:28:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6N 2002-02-13 sources
>Organization:
Matthias Scheler                                  http://scheler.de/~matthias/
>Environment:
System: NetBSD lyssa.b5.zhadum.de 1.6N NetBSD 1.6N (LYSSA) #0: Thu Feb 13 14:03:32 CET 2003 tron@lyssa.b5.zhadum.de:/src/sys/compile/LYSSA i386
Architecture: i386
Machine: i386
>Description:
During a "make cleandir" in "/usr/src" I experienced several errors:

rm -f llib-li386.ln  pcio.ln comio_direct.ln getsecs.ln gatea20.ln getextmemx.ln printmemlist.ln pread.ln menuutils.ln parseutils.ln bootinfo.ln bootinfo_biosgeom.ln bootinfo_memmap.ln panic.ln biosdisk.ln biosdisk_ll.ln diskbuf.ln
rm -f .depend /src/NetBSD-current/src/sys/arch/i386/stand/lib/tags
rm -rf lib
*** Error code 1

It turns out that our rm(1) got broken by recent changes and returns an
incorrect exit code after removing a directory.

>How-To-Repeat:
tron@lyssa:/tmp>mkdir bla
tron@lyssa:/tmp>/bin/rm -rf bla
tron@lyssa:/tmp>echo $?
1
tron@lyssa:/tmp>ls bla
ls: bla: No such file or directory

>Fix:
None provided.

>Release-Note:
>Audit-Trail:
>Unformatted: