lkml.org 
[lkml]   [2001]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: 2.4 and 2GB swap partition limit
On Mon, 30 Apr 2001, David S. Miller wrote:

>
> Richard B. Johnson writes:
> > On Mon, 30 Apr 2001, Torrey Hoffman wrote:
> > > In general, is there a safe way to replace executable files for
> > > programs that might be running while their on-disk images are
> > > replaced?
> >
> > Yes. Perfectly safe:
> >
> > mv /usr/bin/exeimage /usr/bin/exeimage.sav
> > cp /wherever/exeimage /usr/bin/exeimage
> >
> >
> > The executing task will continue to use the old image until it exits.
>
> Even more effective is:
>
> mv /wherever/exeimage /usr/bin/exeimage
>
> The kernel keeps around the contents of the old file while
> the executing process still runs.
>
> This is also basically how things like libc get installed.
> A single mv is not only preserves currently referenced contents,
> it is atomic.
>
> Later,
> David S. Miller
> davem@redhat.com

Sure, but now you can't get back if the new software doesn't run.
This is why I recommended the two steps and cautioned about testing
the new stuff first.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.105 / U:42.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site