*BSD News Article 13982


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!darwin.sura.net!newsserver.jvnc.net!yale.edu!ira.uka.de!scsing.switch.ch!bernina!neptune!inf.ethz.ch!weingart
From: weingart@inf.ethz.ch (Tobias Weingartner)
Subject: Re: File Truncation Philosophy
Message-ID: <1993Apr4.124038.11450@neptune.inf.ethz.ch>
Followup-To: cop.os.386bsd.development
Sender: news@neptune.inf.ethz.ch (Mr News)
Nntp-Posting-Host: antares.inf.ethz.ch
Reply-To: weingart@inf.ethz.ch
Organization: ETH - Switzerland
References: <C4tJ6C.C17@ns1.nodak.edu> <CGD.93Apr1173018@eden.cs.berkeley.edu> <1993Apr2.024424.13864@coe.montana.edu>
Date: Sun, 4 Apr 1993 12:40:38 GMT
Lines: 34

In article <1993Apr2.024424.13864@coe.montana.edu>, nate@cs.montana.edu (Nate Williams) writes:
[deleted]
> 
> The main reason I see that something needs to change is for doing
> simple:
> make install
> in /usr/src.  If you happen to write a new copy of /sbin/init, it
> is possible to take your machine down.  This is a BAD THING, and
> either we need to kludge up install, or we need to fix the behavior
> of copying over running executables.  It is possible (a very quick
> perusal of restore doesn't show it) that restore will show
> the same behavior as install.  You can minimize this by running
> in single user, but I'd rather not play roulette and hope that
> my executable was completely in memory when I copies a new file
> on top of it.
> 

Huh?  I thought that a currently executing program could not be opened
for write.  I thought the kernel would return

E_EXEC 

or something like that in that case!

I think that would be 'correct' behaviour.  Then only install would have
to be changed.  It could do an 'unlink', but chances are that a mv
followed with a cp and then an unlink would be safer.  (Make sure the
file installed successfully).  Side effect: Need more space to install.

--Toby.

Tobias Weingartner  *    PGP2.1 Public Key available at     *
 +41'41'33'25'40    *   'finger weingart@tau.inf.ethz.ch'   *
%SYSTEM-F-ANARCHISM, the operating system has been overthrown