🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #148

lpd(8) filter logfiles

#148
From: Steve Campbell
Date: Sat, 13 Jan 1990 20:43
15 lines
1170 bytes
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
Technical Details
Message-ID: <18490@dartvax.Dartmouth.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!bu.edu!bu-cs!dartvax!avalon.dartmouth.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!bu.edu!bu-cs!dartvax!avalon.dartmouth.edu
From: steve@avalon.dartmouth.edu (Steve Campbell)
Newsgroups: comp.bugs.4bsd
Subject: lpd(8) filter logfiles
Message-ID: <18490@dartvax.Dartmouth.EDU>
Date: 13 Jan 90 20:43:28 GMT
Sender: news@dartvax.Dartmouth.EDU
Organization: Dartmouth College, Hanover, NH
Lines: 15