[comp.bugs.4bsd] lpd

steve@avalon.dartmouth.edu (Steve Campbell) (01/14/90)

All the documentation for line printer filter programs says that when a
filter runs, stderr is attached to the log file defined in the lf=
field in the /etc/printcap entry for the printer.  And if you look in
printjob.c, the logfile is in fact opened for file descriptor 2, ie for
stderr.  But then just before the filter is exec'd, lpd creates a
temporary file named errNNNNNN in the spool directory of the printer,
and dup2's this file to file descriptor 2.  So much for the lf= file.
Then, under non-error conditions, that temp file is unlinked at the end
of the print job.

Is this a case of documentation that lies, or is there a reason for this
behavior?  What good is the lf= entry anyway?

						Steve Campbell
						Dartmouth College