On Mon, Nov 11, 2002 at 11:56:02AM +0200, Shaul Karl wrote: > As you probably aware of, having a ro /usr and trying to remount it ro > after apt-get upgrade sometimes fails because the device or resource is > busy. > > I heard a possible explanation for this behavior and I was looking for > other people comments. It can be that I don't understand some or all of > the details. The explanation I heard goes like this: > Basically, when one removes a binary file from a UNIX file system, it > is gone - no matter if this binary is currently in use. Therefore, > assuming this binary is larger then one page of memory, as soon as the > system will have to load other pages of the binary into main memory in > order to be able to run other parts of the code it will fail to find it.
This depends on the UNIX you are talking about. On Solaris, a program will get SIGSEGV as soon as it is scheduled to run again if you delete it's binary. On Linux however the program will continue to run just fine until the program exits. ... I just tested this with a very short binary. It continues to run fine after being deleted. I can also remount the partition ro. -rob
msg12449/pgp00000.pgp
Description: PGP signature