lkml.org 
[lkml]   [1998]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Anybody out there? (ETXTBSY)
From
Date
Petri Kaukasoina <kaukasoi@elektroni.ee.tut.fi> wrote:
> On Fri, Aug 28, 1998 at 02:57:59AM +0000, H. Peter Anvin wrote:
> > Upgrading /bin/sh is perfectly doable, as is upgrading libc.so. You
> > have to unlink() the binary and then rename() the new one to the
> > proper name, of course without needing to run a new binary in between.
>
> why unlink() ? rename() should be enough and then there's no time when
> /bin/sh or libc is missing.

Hi,

From the man page of rename:

int rename(const char *oldpath, const char *newpath);

.....
If newpath already exists it will be atomically overwrit­
^^^^^^^^
ten (subject to a few conditions - see ERRORS below), so
^^^
that there is no point at which another process attempting
to access newpath will find it missing.

You don't want to overwrite the existing libc.so or your running
binaries running against it will stop work in that moment.

Cheers, Juan.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

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