Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!gatech!mcnc!rti!trt From: trt@rti.UUCP (Thomas Truscott) Newsgroups: comp.unix.wizards Subject: Re: Demand paged executables Summary: Cannot unlink them thanks to implementation botches Message-ID: <2765@rti.UUCP> Date: 2 Feb 89 19:25:04 GMT References: <409@lakart.UUCP> <1997@solo12.cs.vu.nl> Organization: Research Triangle Institute, RTP, NC Lines: 29 In article <1997@solo12.cs.vu.nl>, maart@cs.vu.nl (Maarten Litmaath) writes: > dg@lakart.UUCP (David Goodenough) writes: > > why is it not possible to unlink a demand paged program that is executing. > > Huh? On 4.3BSD: ... it works fine This is a non-portable feature. As far as I can tell it is non-portable due to buggy implementations, or maybe just paranoid implementations. In most System V systems you cannot unlink the last on-disk link to an executing program. There is no particular reason for this, just remove the check (easiest if you have kernel source!) and everything works fine. In Ultrix 2.x you could unlink an executing demand-paged program, but the file blocks would not be returned to the free list and must be reclaimed with fsck (really!). This is fixed in Ultrix 3.0 -- unlinking an executing program works just fine now. In HP-UX 6.2 you cannot unlink an executing demand paged (or shared) program, regardless of how many other on-disk links there are. I have no idea why this change was made (HP-UX 6.0 did not have the restriction), perhaps someone with access to the source can tell us. (e.g. did this fix a problem ala Ultrix 2.x?). Perhaps some HP-UX wizard could get in touch with me, I sure would like a work-around for this. Tom Truscott (919) 541-7005