From owner-freebsd-questions@FreeBSD.ORG Fri Nov 25 17:46:52 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4D0816A41F for ; Fri, 25 Nov 2005 17:46:52 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D0E943D66 for ; Fri, 25 Nov 2005 17:46:52 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 639D9D17F53 for ; Fri, 25 Nov 2005 12:46:50 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.151]) by frontend1.internal (MEProxy); Fri, 25 Nov 2005 12:46:50 -0500 X-Sasl-enc: Ne2bYlh6KwdHKKLLNdUkDUrbNSSLt6DZntMFdQUJHYcN 1132940808 Received: from gumby.localdomain (88-104-192-20.dynamic.dsl.as9105.com [88.104.192.20]) by frontend2.messagingengine.com (Postfix) with ESMTP id 12041571431 for ; Fri, 25 Nov 2005 12:46:47 -0500 (EST) From: RW To: freebsd-questions@freebsd.org Date: Fri, 25 Nov 2005 17:46:47 +0000 User-Agent: KMail/1.8.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511251746.48768.list-freebsd-2004@morbius.sent.com> Subject: Cleaning-up stale PID files on reboot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 17:46:53 -0000 I start mlnet, the daemon part of mldonkey, from it's local rc.d script on bootup. If mlnet isn't shutdown properly, it leaves behind a pid file that prevents the daemon running until I notice and manually delete the file. What's the best way to deal with this? I was wondering if there is some standard place to clean-up after an improper shutdown. Is mlnet doing something wrong? I don't get the same problem with other daemons.