rmdir --ignore-fail-on-non-empty does not work

Bug #1073850 reported by Tamas Papp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ sudo rmdir --ignore-fail-on-non-empty /tmp
rmdir: failed to remove `/tmp'

$ echo $?
1

On Lucid there is no error message and the exit code is 0.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: coreutils 8.13-3.2ubuntu2
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Thu Nov 1 10:22:11 2012
InstallationDate: Installed on 2011-06-26 (493 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: coreutils
UpgradeStatus: Upgraded to quantal on 2011-08-27 (431 days ago)

Revision history for this message
Tamas Papp (tompos) wrote :
Revision history for this message
Robert Roth (evfool) wrote :

I have tested this with a newly created directory with a single file in it, and 'rmdir testx' exited with error 1, but 'rmdir --ignore-fail-on-non-empty testx' exited with 0 exit status, so I guess the 1 exit status on not being able to remove /tmp is not 'because a directory is non-empty' (cited from man), but maybe other errors too. I don't know however what could be causing it, as you are trying to run it with sudo, so permission issues should be out of the question.

Revision history for this message
Tamas Papp (tompos) wrote :

Indeed, there are systems, where I cannot reproduce.
All the systems are Precise and Quantal.

I'm trying to debug it more deeply.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.