Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 15680 - wrong pid file
wrong pid file
Product: Red Hat Linux
Classification: Retired
Component: LPRng (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
Depends On:
  Show dependency treegraph
Reported: 2000-08-07 17:00 EDT by mal
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-07 19:50:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mal 2000-08-07 17:00:54 EDT
LPRng creates a pid file as 
This is incorrect. 
All scripts from /etc/rc.d/init.d/functions
are looking for a file
Change process file name to a standard one.
Comment 1 Crutcher Dunnavant 2000-08-07 19:03:58 EDT
I see the issue, but I cannot find the pid code.
Will fix later.
Comment 2 mal 2000-08-07 19:50:10 EDT
It uses lockfile.port lock file format.
grep on Lockfile_DYN
grep Lockfile_DYN src/*/*
and in all places where 
path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, __LINE__ );
replace Lpd_port_DYN to "pid"
Comment 3 Crutcher Dunnavant 2000-08-08 16:23:28 EDT
There is to much magic associated with this file for me to want to touch it
right before a release.
Specifically, what happens if there are more than one spooler (which is posible
with LPRng).
I will send a request to the upstream maintainer on this, but I'm closing it for
now, as it's control script does some other magic to find the pid.
Comment 4 mal 2000-08-08 16:37:58 EDT
The replacement of Lpd_port_DYN to "pid"
will work fine while you have 
lpd working with a single port (printer=515).
The Lpd_port_DYN is just a string "printer"
when printer port is 515, or string
representing port number otherwise.

The program will not work if one started
two or more lpd which sit on different ports.
But from /etc/rc.d/init/lpd 
you can not do this anyway.

grep Lockfile_DYN  src/*/* 
src/common/checkpc.c:	if( Lockfile_DYN == 0 ){
src/common/checkpc.c:		path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN,
__FILE__, __LINE__ ); 
src/common/lpd.c:	if( Lockfile_DYN == 0 ){
src/common/lpd.c:	path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__,
__LINE__ );
src/common/lpd.c:	path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__,
__LINE__ );
src/common/vars.c:{ "lockfile", STRING_K, &Lockfile_DYN,1,0,"=" LOCKFILE},
src/include/lp.h:EXTERN char* Lockfile_DYN;

There are 3 places affected:
two in lpd.c 
and one in checkpc.c

Note You need to log in before you can comment on or make changes to this bug.