Truncated lpr printouts

walt del vecchio wdelv at devnet3.hac.com
Wed May 15 06:24:51 AEST 1991


  I'm having difficulty running an application which among other tasks
produces reports on the line printer on a Sun3 running SunOS 3.5.
  In order to make use of UNIX print spooling utilities this application
is configured as a "printer" in /etc/printcap.  Actually, the printer device
is specified as /dev/null, and the input filter is a short program which
constructs a command line with appropriate arguments which is subsequently
run via execl(3).  That way there is no conflict among arguments/flags meant
for lpr(1) as opposed to the application program.
  One of the things the program does is print a self-generated report on a
real printer via system(3) call.  This works fine for the most part.
However, very large printouts get truncated.
  The actual printout comes from a file created by the application which is
unlink(2)'d after the system(3) call which cat(1)'s the print file through
a filter and then to lpr(1).  Although I haven't checked the print file
explicitly, I don't think that it is written in the truncated form. The
lpd(8) error output specifies a "Broken pipe" message for the system(3)
call for the cat through the filter through lpr(1).
  I already have set :mx#0 in /etc/printcap for the application as well as
the real printer entries (even in printcaps on remote machines as well).
  If I run the application that is execl'd, from a terminal instead,
I get full listings.  But, running the application via lpd(8) causes
truncation for large printouts on the real printer.
  I am sure that the entire input dataset passed to the application is
getting processed, since an Ingres database gets updated as expected
by the application.  It's just the paper report that gets cut-off.
  Since the main difference between full and truncated printouts appears
to be whether the application is run from a terminal or lpd(8), what can
I do to resolve this?  Is there some internal shell limit for print size or
pipe throughput or something like the csh limit in the bourne shells which
are execl(3)'d and system(3)'d?  Does lpd(8) have internal limits set?
  Do I have to use lpr(1) -s, meaning producing another file after the pipe
through the filter and then depositing it on the remote machine which has
the paper printer attached and running the lpr command in the background
so the application program isn't tied up waiting for a free printer?

  Thanks for reading this far.

 ------------------------------------------------------------------------------
  Walter L. Del Vecchio - Hughes Aircraft Co. - Fullerton, CA - (714) 732-5588
 ------------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list