On Monday 06 September 2010, Keith Edmunds wrote:
> On Mon, 6 Sep 2010 17:24:42 +0100, [email protected] said:
> > That's as I understand it, but there is apparently a company out there
> > somewhere that can patch a running kernel for Enterprise customers.
> 
> Well, actually, anyone can do that for any customer, although I wouldn't
> recommend it.
> 
> Previous posters are right: the currently-running application will run
> from memory. Some upgrades (eg, Apache under Debian) will restart the
> daemon as part of the upgrade.
> 
> --
> Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
> Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
> How to Report Bugs Effectively:  http://bit.ly/4sACa
As I recall....
        Normal user space executable files....
        An running executable (ELF executable at any rate [ "file /bin/cat" to 
see] ) holds its executable file open and pages in from this executable file 
(when read-only or "clean" pages are required). The executable pages OUT (i.e. 
pages that have changed - "dirty") to the swap file - from where they are paged 
back in if required.
Thus - (and I have seen this happen) if you _overwrite_ a running programs' 
executable file it will more than likely crash!
BUT.... The standard technique used for installing a new executable file (Used 
to be - at any rate) is to first of all delete (aka "rm") the existing file 
before creating the new one.
This invokes an ancient bit of UNIX/Linux fundamentals    ... a file is NOT 
actually deleted until no executables have it open. - thus the running program 
still has access to the already open ORIGINAL executable file - so pages in 
happilly and keeps running. But the original file is no longer visible in the 
file-system (but it still occupies an inode).
The updating software then creates a NEW executable (the updated version) and 
any new invocations of the executable file lo & behold will now run the updated 
version.
Thus you can "update" a running executable file.

As for Windows - you must be joking!

-- 
Andy Paterson

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa

Reply via email to