Demand paged executables

Leslie Mikesell les at chinet.chi.il.us
Thu Feb 2 10:26:01 AEST 1989


In article <409 at lakart.UUCP> dg at 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



More information about the Comp.unix.wizards mailing list