output to printer

Robert Lipe robertlipe@usa.net
Thu Apr 5 12:09:00 GMT 2001


Toon Moene wrote:
> nbecker@fred.net wrote:
> 
> > > You cannot do that directly on Linux - you have to do something like:
> 
> > > ./a.out | lpr
> 
> You don't want users to log in as root just for the pleasure of doing:
> 
>       OPEN(UNIT=1, FILE='/dev/lp0')
>       WRITE(UNIT=1, *) 'HELLO, WORLD'
>       END

Even if you DID want the users to log in as root (boooooo), I wouldn't
want to use that system anyway.  If you happened to be on a system where:
  * more than one user may be printing something, 
  * printer is on a serial, usb, uucp, or network connection
  * the printer handles multiple forms in the printer or needs input bin
    commands
  * even just wanted decent application response time while printing, 

this approach would break.  For the general purpose case, you really,
really, really want to send print jobs to the spooler and let it sort
these things out.


But this no longer has much to do with GCC development...

RJL



More information about the Gcc mailing list