Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!agate.berkeley.edu!cgd From: cgd@eden.CS.Berkeley.EDU (Chris G. Demetriou) Newsgroups: comp.os.386bsd.development Subject: Re: File Truncation Philosophy Date: 1 Apr 93 20:49:06 Organization: Kernel Hackers 'r' Us Lines: 45 Message-ID: <CGD.93Apr1204906@eden.CS.Berkeley.EDU> References: <C4tJ6C.C17@ns1.nodak.edu> <CGD.93Apr1173018@eden.CS.Berkeley.EDU> <C4u8y2.HCM@ns1.nodak.edu> NNTP-Posting-Host: eden.cs.berkeley.edu In-reply-to: tinguely@plains.NoDak.edu's message of Fri, 2 Apr 1993 04:10:50 GMT In article <C4u8y2.HCM@ns1.nodak.edu> tinguely@plains.NoDak.edu (Mark Tinguely) writes: =>fact, replacing the binaries of a executing program will lead to a core. =>one SMALL example is rsh of a running rrestore. another example is the install =>step if the program is running. fact, unlinking the executing program before =>replacing the program prevents this. (the kernel and init are started =>differently, and have to be handled differently). => =>the request is ideas how many problems will be introduced by changing this? =>If it is changed, where should it be change? maybe executing program can =>have it's inode protected from truncation, or other low changes to how =>truncation of a inode. sorry, what i had tried to say, but managed to say rather poorly was the following: (1) programs exist to install and/or restore binaries. (2) they, and only they, should be used to install and/or restore binaries. (3) they should do so correctly apparently, i didn't state (2) well, and i didn't state (3) at all, leaving both you and nate wonder what i was thinking... i don't think that "cp" falls into (1), however, programs like "install" and "restore" do. therefore, in my opinion, programs like "install" and "restore" should be modified to work correctly (i believe install does, but from your comments, i'd surmise that restore doesn't...), and programs like "cp" should not. i'd throw "tar" and "cpio" in with "programs like cp", and, in in my opinion, *all* user programs that are not specifically meant to install or restore files (e.g. programs like the c compiler, the shells -- any random program) should remain unmodified. chris -- Chris G. Demetriou cgd@cs.berkeley.edu "386bsd as depth first search: whenever you go to fix something you find that 3 more things are actually broken." -- Adam Glass