From owner-freebsd-commit Sat Aug 5 17:06:09 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id RAA06969 for commit-outgoing; Sat, 5 Aug 1995 17:06:09 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id RAA06931 for cvs-usrbin-outgoing; Sat, 5 Aug 1995 17:04:45 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id RAA06920 ; Sat, 5 Aug 1995 17:04:12 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id JAA31395; Sun, 6 Aug 1995 09:57:27 +1000 Date: Sun, 6 Aug 1995 09:57:27 +1000 From: Bruce Evans Message-Id: <199508052357.JAA31395@godzilla.zeta.org.au> To: bde@zeta.org.au, rgrimes@gndrsh.aac.dev.com Subject: Re: cvs commit: src/usr.bin/xinstall xinstall.c Cc: CVS-commiters@freefall.cdrom.com, cvs-usrbin@freefall.cdrom.com, joerg@freefall.cdrom.com Sender: commit-owner@FreeBSD.org Precedence: bulk >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