From nobody@FreeBSD.org  Mon Jul 23 09:52:56 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 0478D37B401
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Jul 2001 09:52:56 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f6NGqt690059;
	Mon, 23 Jul 2001 09:52:55 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200107231652.f6NGqt690059@freefall.freebsd.org>
Date: Mon, 23 Jul 2001 09:52:55 -0700 (PDT)
From: Jeremiah Gowdy <jgowdy@home.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: rc.pccard doesn't check /var/run/pccardd.pid
X-Send-Pr-Version: www-1.0

>Number:         29167
>Category:       conf
>Synopsis:       rc.pccard doesn't check /var/run/pccardd.pid
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 23 10:00:03 PDT 2001
>Closed-Date:    Tue Jun 29 09:16:28 MDT 2004
>Last-Modified:  Tue Jun 29 09:16:28 MDT 2004
>Originator:     Jeremiah Gowdy
>Release:        4.3-STABLE
>Organization:
Sherline Products
>Environment:
FreeBSD cx443070-c.vista1.sdca.home.com 4.3-STABLE FreeBSD 4.3-STABLE #1: Sun Jul 22 20:57:30 PDT 2001     root@cx443070-c.vista1.sdca.home.com:/usr/src/sys/compile/SONY  i386
>Description:
rc.pccard doesn't check /var/run/pccardd.pid to see if pccardd is already running, and therefore if you modify configuration and /etc/netstart, you get a defunct copy of pccardd in addition to the one that was already running.  This patch to rc.pccard simply checks for the existence of the .pid file, and if it exists, checks to see if the process is actually running, or if the pid file is just a leftover.  In either case, it starts pccardd as usual, but does not start two pccardds.
>How-To-Repeat:
run /etc/netstart twice (or more) with pccard enabled in rc.conf
>Fix:
rc.pccard.diff

34,41d33
<       if [ -e /var/run/pccardd.pid ] ; then 
<               pid=`cat /var/run/pccardd.pid`
<               psline=`ps -p $pid | grep -v PID`
<               if [ ! -n "$psline" ] ; then
<                       rm /var/run/pccardd.pid
<               fi
<       fi
<       if [ ! -e /var/run/pccardd.pid ] ; then
63d54
<       fi
>Release-Note:
>Audit-Trail:

From: "Jeremiah Gowdy" <jeremiah@sherline.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <jgowdy@home.com>
Cc:  
Subject: Re: conf/29167: rc.pccard doesn't check /var/run/pccardd.pid
Date: Wed, 25 Jul 2001 11:13:16 -0700

 Actually, this might be a little cleaner
 
 33a34,37
 >       if [ -e /var/run/pccardd.pid ] ; then
 >               process="/proc/`cat /var/run/pccardd.pid`"
 >       fi
 >       if [ ! -e $process ] ; then
 54a59
 >       fi
 
 Jeremiah
 
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 16:54:00 PDT 2003 
Responsible-Changed-Why:  
Assign to pccard maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=29167 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Tue Jun 29 09:15:35 MDT 2004 
State-Changed-Why:  
pccardd now appears to exit on running the second time.   Please let 
me know if this isn't fixed in 4.10. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=29167 
>Unformatted:
