Dnia środa, 11 października 2006 06:21, Anthony E. Caudel napisał:
> I have been using Gentoo for more than 2 years now and have always
> wondered (but never asked - That's the "dumb" part) how Gentoo manages
> to update a package that happens to be running at the time.
>
> Given that the old version (the one running) is deleted, how does it
> manage to keep standing if you just cut its legs off?
>
> I've never seen this discussed anywhere which probably means everyone
> else already knows and are probably thinking to themselves, "Dumb
> question."

Observe CAREFULLY sequence of operations during emerge. It doesn't remove old 
package and install new ones. It installs the new one over the old and then 
removes unnecessary remains.

It may overwrite file in use due to the way Unices handle file management. On 
Windows you can't delete open file. On Unix you can, and process keeping file 
open won't usually notice that. Moreover, as long as the file is open, its 
data isn't removed from disk. Once the process closes it, it is physically 
removed - not sooner.

So after overwriting file (library, application) currently running 
applications (having it open) will still have access to old version and each 
newly run application will use the new one.

Which in turn means - yes, you need to 'power cycle' application to use new 
libraries or new version of executable.

-- 
 Pawel Kraszewski
 www.kraszewscy.net

-- 
gentoo-user@gentoo.org mailing list

Reply via email to