From owner-freebsd-stable@FreeBSD.ORG Tue Apr 19 20:39:14 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB14A16A4CE for ; Tue, 19 Apr 2005 20:39:14 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C4F243D41 for ; Tue, 19 Apr 2005 20:39:14 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j3JKdDhJ020133; Tue, 19 Apr 2005 15:39:13 -0500 (CDT) (envelope-from dan) Date: Tue, 19 Apr 2005 15:39:13 -0500 From: Dan Nelson To: Bill Moran Message-ID: <20050419203913.GB50313@dan.emsphone.com> References: <426447F8.5090209@charter.net> <200504191317.j3JDH76H001458@drjekyll.mkbuelow.net> <20050419120053.6ad17df1.wmoran@potentialtech.com> <42655B8E.5020603@mac.com> <20050419163237.76a99373.wmoran@potentialtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050419163237.76a99373.wmoran@potentialtech.com> X-OS: FreeBSD 5.4-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-stable@freebsd.org Subject: Re: Newbie Question About System Update X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2005 20:39:14 -0000 In the last episode (Apr 19), Bill Moran said: > Chuck Swiger wrote: > > Bill Moran wrote: > > > The system can not replace programs that are in use, > > This is generally not the case. Unix lets you continue to access a > > file after it has been deleted, so long as the process hangs on to > > a file descriptor. This lets you replace programs in use, without > > running into the same problems that platforms like Windows have. > > What you say?: > > bash-2.05b$ su > Password: > bolivia# cp /usr/sbin/cron /home/wmoran/. > bolivia# cp /home/wmoran/cron /usr/sbin/. > cp: /usr/sbin/./cron: Text file busy > bolivia# > > Notice that /usr/sbin/cron is in use (because my system is running > normally) I can copy _from_ that file, but I can not overwrite it. What you can do, however, is: create the new file under a temporary name, delete the original, and rename the temp file to the orignal's name, which is what /usr/bin/install does. I've done many installworlds on running systems without problems. -- Dan Nelson dnelson@allantgroup.com