From owner-cvs-usrbin Sat Aug 5 17:26:50 1995 Return-Path: cvs-usrbin-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id RAA07767 for cvs-usrbin-outgoing; Sat, 5 Aug 1995 17:26:50 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id RAA07761 ; Sat, 5 Aug 1995 17:26:44 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id RAA03325; Sat, 5 Aug 1995 17:26:08 -0700 From: "Rodney W. Grimes" Message-Id: <199508060026.RAA03325@gndrsh.aac.dev.com> Subject: Re: cvs commit: src/usr.bin/xinstall xinstall.c To: bde@zeta.org.au (Bruce Evans) Date: Sat, 5 Aug 1995 17:26:07 -0700 (PDT) Cc: bde@zeta.org.au, CVS-commiters@freefall.cdrom.com, cvs-usrbin@freefall.cdrom.com, joerg@freefall.cdrom.com In-Reply-To: <199508052357.JAA31395@godzilla.zeta.org.au> from "Bruce Evans" at Aug 6, 95 09:57:27 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 874 Sender: cvs-usrbin-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). Okay, sounds great. Meanwhile would you go back out that bad hack to install before it causes some greif some place. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD