[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#228542: lpd lock file location violates FHS (and LSB)



On Wed, Jan 28, 2004 at 04:04:44PM -0600, Steve Greenland wrote:
> On 28-Jan-04, 15:42 (CST), Adam Majer <adamm@galacticasoftware.com> wrote: 
> > This is stupid and makes no sense. /var/spool/lpd is NOT cleaned during
> > boot but the daemon uses a PID file for locking purposes. If a system crashes,
> > lpd will (should) not start since the /var/spool/lpd is "locked".
> 
> As quoted, it makes no sense anyway. The mere existence of a file cannot
> be used as check on whether or not a process is running. Whether or not
> the directory is cleaned on boot, one can still have lpd exit/crash in a
> way that doesn't remove the file. Therefore, anything checking the file
> must also check that referenced process id a) is still running, and b)
> is actually lpd. Anything less than that is bug is the program doing the
> check.


So what is the point of cleaning up /var/run ?? If the daemons (at least
the init.d scripts anyway) are each suppose to check if the /var/run/my_daemon.pid
is stale or not, then there is no point in cleaning /var/run.


> > I'm inclined to just leave the PID file in the /var/run - this is the place
> > for PID files. 5.14.3 can be satisifed by saying that lpd in Debian doesn't
> > have a lock file. OR I can just add a dummy file in the lpr source to act
> > as a lock file.
> 
> Create a symlink from from /var/spool/lpd/lpd.lock to /var/run/lpd.pid.
>
> > If I have to move the pid file to /var/spool/lpd, then initscripts has
> > to change as well.
> 
> Not really. 


Well, I would like to get that pid file cleaned up if the system crashes.
But if I just make it a symlink, I can just leave it dangling...


> Steve Greenland
>     The irony is that Bill Gates claims to be making a stable operating
>     system and Linus Torvalds claims to be trying to take over the
>     world.       -- seen on the net

I don't think Gates is trying to take over the world otherwise he would be
using Nazi techniques like SCO is. But when it comes to Linus, well, you never
know :P



Reply to: