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

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

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

> 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. 


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

Reply to: