| To: | yyyyyy@xxxxxxxxxxxxx, yyyyyyyyyyyyyyy@xxxxxxxxxxxxx, yyy@xxxxxxxxxxxxxxxxxxx |
|---|---|
| Subject: | Re: Defect in XSH unlink |
| From: | yyyyyyyyyyyyyyy@xxxxxx |
| Date: | Wed, 10 Apr 2002 17:46:07 GMT |
Andrew,
The current EPERM covers two cases:
1. The named file is a directory and the calling process does not have
appropriate privileges, and
2. The named file is a directory and the implementation prohibits
using unlink() on directories.
If I were inventing a new operating system from scratch today, I would
agree that case 2 should be EISDIR. But I believe it is too late to
rewrite this much history and EPERM should continue to be used for both
of these errors on any UNIX/POSIX system implementation. I see no
reason why applications that have been written to POSIX (1988 through
the present) should be subjected to this arbitrary change in behavior.
Things depend on your definition of POSIX system.
There are lots of minor differences between almost any Unix-like
system and the POSIX standard. Certainly 4.3BSD that you quote
does not fully conform to POSIX.
These days we also have Linux as an important example of a Unix-like system.
I don't know whether Andrew's question was inspired by it, but Linux returns
EPERM in case 1, and EISDIR in case 2.
So "it is too late to rewrite history" does not really apply.
History was rewritten already. Every portable application will
today have to reckon with the possibility of an EISDIR return.
Andries
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Defect in XSH unlink, Don Cragun |
|---|---|
| Next by Date: | RE: Defect in XSH unlink, Donn Terry |
| Previous by Thread: | Re: Defect in XSH unlink, Don Cragun |
| Next by Thread: | RE: Defect in XSH unlink, Donn Terry |
| Indexes: | [Date] [Thread] [All Lists] |