Re: Anybody out there? (ETXTBSY)

Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Fri, 28 Aug 1998 20:53:50 -0300


In message <yttzpcp9ic3.fsf@krilin.dc.fi.udc.es>, "Juan J. Quintela" writes:
+-----
| 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
| > why unlink() ? rename() should be enough and then there's no time when
| > /bin/sh or libc is missing.
| .....
| If newpath already exists it will be atomically overwrit­
| ^^^^^^^^
| ten (subject to a few conditions - see ERRORS below), so
| ^^^
|
| You don't want to overwrite the existing libc.so or your running
| binaries running against it will stop work in that moment.
+--->8

Umm, you'd be overwriting at most an older libc.so (the current one is the
*source* of the rename, not the target; we're replacing unlinking the
current one with renaming it as a backup).

This could be problematic if you do it twice in a row without an intervening
reboot, but I suspect that if you need to do that you're probably well and
truly screwed anyway and the second attempt wouldn't save you even if it
didn't trash the original.

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering					 KF8NH
carnegie mellon university

- 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