Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!mcdchg!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.wizards Subject: Re: Demand paged executables Message-ID: <7599@chinet.chi.il.us> Date: 2 Feb 89 00:26:01 GMT References: <409@lakart.UUCP> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 24 In article <409@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes: >There is doubtless a good reason for it, but why is it not possible to >unlink a demand paged program that is executing. I realise that >the system needs to keep the program text somewhere, but why can it not >do the same as is done with a normally open file: just remove the >directory entry, but hang on to the I-node and disk blocks until such >time as the process execl()'s or exit()'s. I am probably missing >something, but I don't see the difference between a d.p. executable >being used, and me opening a file and going >... seek(); read(); ... seek(); read(); ... I don't have the answer to the question but there is a work-around. Just make a link to the running program somewhere else, then you can remove the original link. If you link under the same name but later in users PATH you can assure that anyone executing the program will get either the old or the new copy (instead of an error) when you install new programs. Now, if a.outs need this kind of protection (and they do) why isn't the same thing done for shell scripts - i.e prevent them from being modified while running? Les Mikesell