From owner-freebsd-questions@FreeBSD.ORG Tue Aug 17 00:34:08 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C081065698 for ; Tue, 17 Aug 2010 00:34:08 +0000 (UTC) (envelope-from fbsd@dannysplace.net) Received: from mail-backup.dannysplace.net (mailgw.dannysplace.net [204.109.56.184]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC7B8FC19 for ; Tue, 17 Aug 2010 00:34:07 +0000 (UTC) Received: from [203.206.171.212] (helo=[192.168.10.10]) by mail-backup.dannysplace.net with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1Ol9ca-000N7S-6h for freebsd-questions@freebsd.org; Tue, 17 Aug 2010 10:01:42 +1000 Message-ID: <4C69D13F.9080404@dannysplace.net> Date: Tue, 17 Aug 2010 10:01:03 +1000 From: Danny Carroll User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Authenticated-User: danny X-Authenticator: plain X-Exim-Version: 4.72 (build at 12-Jul-2010 18:31:29) X-Date: 2010-08-17 10:01:40 X-Connected-IP: 203.206.171.212:51090 X-Message-Linecount: 40 X-Body-Linecount: 29 X-Message-Size: 1582 X-Body-Size: 1118 X-Received-Count: 1 X-Recipient-Count: 1 X-Local-Recipient-Count: 1 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 X-SA-Exim-Connect-IP: 203.206.171.212 X-SA-Exim-Mail-From: fbsd@dannysplace.net X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on damka.dannysplace.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on mail-backup.dannysplace.net) Subject: Upgrading ports while processes are running. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fbsd@dannysplace.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2010 00:34:08 -0000 Hiya All, I just finished upgrading perl on one of my machines and something crossed my mind while it was busy compiling and reinstalling all of the ports that depended on perl. Will a port install fail if it cannot write to a file because it's in-use? Also, is it necessary to restart the server or at lease the apps after a port upgrade? The answer to the second question is certainly yes. But is it considered dangerous to upgrade a port that is currently running? Things like mysql and apache come to mind. To take it one step further, what about shared libraries? If a process is using a shared lib, then it seems that it does not lock the file for writing, but I would think that it would not start using the lib until you restarted all of the processes that used that shared lib. Once the last process using the shared lib is killed, is it automatically unlinked from memory? I guess best practice should be to restart the system after a major port upgrade (unless you know which processes depend on the files that have been upgraded - then you should just be able to restart those processes). -D