Message-ID: <3B19AA7F.4F4442EB@yesic.com>
From: Lew Pitcher <lpitcher@yesic.com>
Organization: The Pitcher Digital Freehold
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686)
X-Accept-Language: en, en-GB, en-US
MIME-Version: 1.0
Newsgroups: comp.os.minix
Subject: Re: Device Drivers again
References: <d1b33313.0105302333.1fa8eccd@posting.google.com> <slrn9hbusr.lei.pino+comp_os_minix@mud.stack.nl> <d1b33313.0105310915.3e30b38d@posting.google.com> <slrn9hejab.iu9.pino+comp_os_minix@mud.stack.nl>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 26
Date: Sun, 03 Jun 2001 05:45:09 GMT
Path: news.adfa.edu.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!news.mel.connect.com.au!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!news-east.rr.com!news-west.rr.com!news.rr.com!news-west.rr.com!newsfeeder.randori.com!news2.randori.com.POSTED!not-for-mail
Xref: news.adfa.edu.au comp.os.minix:37529

Martijn van Buul wrote:
> 
> It occurred to me that bigbinc wrote in comp.os.minix:
[snip] 
> To use the printer, a user program should do the following:
> 
> int fd=open("/dev/lp",O_WRONLY);
> write(fd,"Foobar\n",7);
> close(fd);

Of course, this is 'direct access' to the printer, and doesn't address
such things as print spooling and multiple simultaneous opens against
/dev/lp

_If_ a print spooler has been installed (and even if it's just a simple
spool script like is on my Minix 1.5 (PH edition) installation), a
fork()/exec() pipe to the spooler would be better. However, I see the
point in _this_ example to the OP's question

> Again, see /dev and mknod.

-- 
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576
