Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Aug 1995 09:57:27 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, rgrimes@gndrsh.aac.dev.com
Cc:        CVS-commiters@freefall.cdrom.com, cvs-usrbin@freefall.cdrom.com, joerg@freefall.cdrom.com
Subject:   Re: cvs commit: src/usr.bin/xinstall xinstall.c
Message-ID:  <199508052357.JAA31395@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Humm.. can install open the file before it is unlinked, unlink it, try
>the install and if it fails some how relink the open file?  [I am not
>much on this type of user land operation, so I am not sure if you can
>do that :-)]

This is on my todo list.  The original file should be left alone until
(a copy of) the new file can be rename()d to it.  This will fix some
race conditions (e.g., something wanting to use libc.so while libc.so
is being installed) and allow better recovery from errors (e.g., when
the disk fills up while the new copy of libc.so is being written).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508052357.JAA31395>