Re: Deleting the current directory, V2.1.54

Ricky Beam (root@defiant.interpath.net)
Sun, 14 Sep 1997 04:34:46 -0400 (EDT)


Letting the chips fall where they may, I quote Richard B. Johnson:
>> > If this new behavior is okay, it could result in some problems for
>> > new-bee Linux users. They could get "lost" as programs running in
>> > certain default directories could have their file operations fail
>> > for no apparent reason as some other task removed that directory
>> > and then recreated it.
>>
>> Yes, the behaviour is OK, and yes you got "lost". You qualify as
>> a newby.
>>
>
>This behavior is unique. Again I note that you are not being civil.

Unique? Like every other system, it fails. It should report ENOENT instead
of EPERM, but it still fails. A very simple thing to fix. [in theory]

We can blame this on: (errno.h)
#define EPERM 1 /* Operation not permitted */

A simple "return -1" == EPERM. Not to be confused with EACCES (access
denied.) So what does POSIX say about this? We need a generic "stale
file/directory handle."

Linux dominion 2.1.55-SMP #2 Thu Sep 11 01:37:48 EDT 1997 i586
[tty5]dominion:~/[4:10am]:cd /tmp
[tty5]dominion:/tmp/[4:11am]:mkdir test
[tty5]dominion:/tmp/[4:11am]:cd test
[tty5]dominion:/tmp/test/[4:11am]:tcsh
[tty5]dominion:/tmp/test/[4:11am]:cd ..
[tty5]dominion:/tmp/[4:11am]:rmdir test
[tty5]dominion:/tmp/[4:11am]:mkdir test
[tty5]dominion:/tmp/[4:11am]:exit
exit
[tty5]dominion:/tmp/test/[4:11am]:touch foo
touch: foo: Operation not permitted

Linux defiant 2.0.27 #4 Tue Dec 31 12:37:14 EST 1996 i486
[ttyp5]defiant:~/[4:04am]:cd /tmp
[ttyp5]defiant:/tmp/[4:04am]:mkdir test
[ttyp5]defiant:/tmp/[4:04am]:cd test
[ttyp5]defiant:/tmp/test/[4:04am]:tcsh
[ttyp5]defiant:/tmp/test/[4:05am]:cd ..
[ttyp5]defiant:/tmp/[4:05am]:rmdir test
[ttyp5]defiant:/tmp/[4:05am]:mkdir test
[ttyp5]defiant:/tmp/[4:05am]:exit
exit
[ttyp5]defiant:/tmp/test/[4:05am]:ls
touch: foo: No such file or directory

SunOS mercury 4.1.3 1 sun4m
[ttyp1]mercury:~/[4:06am]:cd /tmp
[ttyp1]mercury:/tmp/[4:06am]:mkdir test
[ttyp1]mercury:/tmp/[4:06am]:cd test
[ttyp1]mercury:/tmp/test/[4:06am]:tcsh
[ttyp1]mercury:/tmp/test/[4:06am]:cd ..
[ttyp1]mercury:/tmp/[4:06am]:rmdir test
[ttyp1]mercury:/tmp/[4:06am]:mkdir test
[ttyp1]mercury:/tmp/[4:06am]:exit
exit
[ttyp1]mercury:/tmp/test/[4:06am]:touch foo
touch: cannot create foo: No such file or directory

SunOS sparky 5.5.1 Generic sun4m sparc SUNW,SPARCstation-5
root@sparky [4:08am] ~:cd /tmp
root@sparky [4:08am] /tmp:mkdir test
root@sparky [4:08am] /tmp:cd test
root@sparky [4:08am] /tmp/test:tcsh
root@sparky [4:08am] /tmp/test:cd ..
root@sparky [4:08am] /tmp:rmdir test
root@sparky [4:08am] /tmp:mkdir test
root@sparky [4:08am] /tmp:exit
exit
root@sparky [4:08am] /tmp/test:touch foo
touch: cannot create foo: No such file or directory

--Ricky