Subject: Re: bin/509: flock-checking of lpd-lock file wrong ?
To: None <andrew@wipux2.wifo.uni-mannheim.de>
From: Adam Glass <glass@NetBSD.ORG>
List: netbsd-bugs
Date: 01/06/1995 20:17:44
   From gnats  Sun Oct  9 07:28:43 1994
   Date: Sun, 9 Oct 1994 15:30:06 +0100
   From: andrew@wipux2.wifo.uni-mannheim.de (Andrew Wheadon)
   Reply-To: andrew@wipux2.wifo.uni-mannheim.de
   X-Send-Pr-Version: 3.2

   >Number:         509
   >Category:       bin
   >Synopsis:       flock-checking of lpd-lock file wrong ?
   >Confidential:   no

   >Description:
	   Whenever I used 'lpc' to check the status, it always says
	   I have no daemon present. If I ps ax | grep lpd, it shows
	   me that the daemon is running. The printing also functions
	   fine. (I print over a remote printer).
	   If you can't repeat this please tell me as it'll mean I'm
	   doing something wrong.

   >How-To-Repeat:
	   setup printing. start "lpd", run "lpc status".

Actually i believe this behavior is correct.

First some background...when lpd is started, it goes into daemon mode.
Then it sits there waiting for requests to print jobs, receive jobs,
remove jobs and display queues.  In all cases it forks off a copy of
lpd to process these commands.  Some of these operations will require
that the daemon lock down that printer's queue (most notably
printjob).  The 'lpc status' command notes not whether the accepting
daemon is present but whether there is a daemon currently locking that
particular printer queue.

Generally there won't be one unless there is something in the queue
for that particular printer.  So i think your reported bug is not a bug.

later,
Adam Glass