Closed Bug 80884 Opened 23 years ago Closed 23 years ago

PR_RmDir() does not handle ENOTEMPTY on Linux

Categories

(NSPR :: NSPR, defect, P3)

x86
Linux

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sergent, Assigned: larryh)

Details

Attachments

(1 file)

PR_RmDir() returns PR_UNKNOWN_ERROR on Linux if you try to
remove a directory that is not empty.

Output from running the attached test program on Linux is:
remove directory fails with: -5994: Some unknown error has occurred

strace shows:
rmdir("bug")                            = -1 ENOTEMPTY (Directory not empty)

On Solaris, the (presumably) proper behavior:
remove directory fails with: -5947: Cannot delete a directory that is not empty

truss shows:
rmdir("bug")                                    Err#17 EEXIST

unix_errors.c should check for ENOTEMPTY.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assigned the bug to Larry.  Target milestone NSPR 4.2 (i.e., the
trunk).
Assignee: wtc → larryh
Priority: -- → P3
Target Milestone: --- → 4.2
Yup. It's broke.
changed unix_errors.c to set correct error.
Tested it; checked it in.
checked in testcase pr/tests/rmdir.c
updated /pr/tests/Makefile.in

Status: NEW → ASSIGNED
r=wtc. marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: