Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2001 09:52:55 -0700 (PDT)
From:      Jeremiah Gowdy <jgowdy@home.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   conf/29167: rc.pccard doesn't check /var/run/pccardd.pid
Message-ID:  <200107231652.f6NGqt690059@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         29167
>Category:       conf
>Synopsis:       rc.pccard doesn't check /var/run/pccardd.pid
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 23 10:00:03 PDT 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107231652.f6NGqt690059>