prelink should not mess with running executables

Jakub Jelinek jakub at redhat.com
Thu Jul 19 11:17:21 UTC 2012


On Thu, Jul 19, 2012 at 07:10:18AM -0400, Sam Varshavchik wrote:
> >What's a special-case band-aid about it?  It looks perfectly
> >reasonable to me.  Why wouldn't you restart init?
> 
> Why would you?If there's nothing wrong with with overwriting an
> executable, and, after all, that's how UNIX worked forever, then why
> bother restarting init?

prelink/rpm/install etc. don't overwrite binaries, they write a temporary
file in the same directory and rename over an executable, that is the
standard UNIX way of upgrading stuff atomically.  The reason for restarting
init is that init is special, if you don't restart it, you have trouble on
system shutdown, because the still used deleted files (init + shared
libraries it uses) prevent from unmounting / cleanly.  These days I
think init reexecs itself during shutdown sequence anyway, so we might
as well get away without restarting it.

	Jakub


More information about the devel mailing list