This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: output to printer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]