🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #519

Re: Unlinking "."

#519
From: weinberg
Date: Thu, 02 Apr 1987 19:11
19 lines
1535 bytes
In article <1059@cci632.UUCP> rrw@cci632.UUCP (Rick Wessman) writes:
>Is it possible under vanilla System V to unlink "."? We have
>the source, and from what I can tell, it is legal.

Yes, it is legal.  It has to be, since (at least in versions prior to V.3)
there is no system call to create or delete a directory in one piece.  Thus,
in order to create a directory you have to do a mknod followed by explicit
creation of "." and ".."; to delete it, you must do the opposite, again one
step at a time.

>If it is legal, should it be OK to be able to remove it when the
>directory is not empty?

In my opinion, no, although I can see the "but then it's not UN*X"
responses coming now!  Of course, determining whether or not a directory
is empty is (or at least has the potential to be) a very expensive
operation.  Besides, the "correct" solution is to provide the
mkdir and rmdir system calls and then prohibit any modification of "."
and ".." from outside the kernel.
Technical Details
Message-ID: <482@necis.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!necntc!necis!weinberg
References: <1059@cci632.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!necntc!necis!weinberg
From: weinberg@necis.UUCP
Newsgroups: comp.bugs.sys5
Subject: Re: Unlinking "."
Message-ID: <482@necis.UUCP>
Date: Thu, 2-Apr-87 14:11:56 EST
Article-I.D.: necis.482
Posted: Thu Apr  2 14:11:56 1987
Date-Received: Sat, 4-Apr-87 15:31:05 EST
References: <1059@cci632.UUCP>
Reply-To: weinberg@necis.UUCP (Glenn Weinberg)
Organization: NEC Information Systems, Acton, MA
Lines: 19
Keywords: unlink