wdelv@devnet3.hac.com (walt del vecchio) (05/15/91)
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 ------------------------------------------------------------------------------
rhartman@thestepchild.sgi.com (Robert Hartman) (05/15/91)
In article <14875@hacgate.UUCP> wdelv@devnet3.UUCP (walt del vecchio) writes: > >... 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? I believe that it is lpd(8) that has an approx. 1MByte limit on its internal data buffer. > 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? I believe that you do. Sorry. > Thanks for reading this far. > > ------------------------------------------------------------------------------ > Walter L. Del Vecchio - Hughes Aircraft Co. - Fullerton, CA - (714) 732-5588 > ------------------------------------------------------------------------------ -r
abrams@dan.ccd.bnl.gov (The Ancient Programmer) (05/17/91)
We do a lot of print spooling of large files(3Mb), and yes there is
a hard coded size limit in lpd which can be overidden with the mx#0 in
/etc/printcap.
From man printcap:
mx num 1000 maximum file size (in
BUFSIZ blocks),
--
INTERNET: abrams@bnl.gov |/ | ^
BITNET: abrams@bnlux0.BITNET |\ |__ /-\