Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 2009 15:54:52 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        current@freebsd.org
Subject:   /etc/rc.d locking devd.pid (was Re: Restarting devd)
Message-ID:  <alpine.BSF.2.00.0910181542440.94243@wonkity.com>
In-Reply-To: <alpine.BSF.2.00.0910171503010.89326@wonkity.com>
References:  <alpine.BSF.2.00.0910171503010.89326@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 17 Oct 2009, Warren Block wrote:

> Immediately after boot, devd restart fails:
>
> # /etc/rc.d/devd restart
> Stopping devd.
> Starting devd.
> devd: devd already running, pid: 398
> /etc/rc.d/devd: WARNING: failed to start devd
>
> And it's right, devd is not running.  Remove the stale pidfile 
> /var/run/devd.pid, and '/etc/rc.d/devd start' goes fine.

...and this is due to dhclient, run from /etc/rc.d at startup, locking 
/var/run/devd.pid:

lightning% lsof /var/run/devd.pid
COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
devd      400  root    6w  VREG  0,101        3 47124 /var/run/devd.pid
dhclient  865  root    6w  VREG  0,101        3 47124 /var/run/devd.pid
dhclient 1024 _dhcp    6w  VREG  0,101        3 47124 /var/run/devd.pid

This is a regression from 7-STABLE, where devd.pid is only locked by 
devd after startup.

-Warren Block * Rapid City, South Dakota USA



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