🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2426

Re: What to do about stdin, stdout, and stderr under Windows 3.0?

#2426
From: DJ Delorie
Date: Wed, 08 May 1991 13:34
27 lines
1915 bytes
In article <1991May7.213347.709@sq.sq.com>, dak@sq.sq.com (David A Keldsen) writes:
> mlord@bwdls58.bnr.ca (Mark Lord) writes:
> >There is a device called NUL for use in the PC world.  NUL == /dev/null
> 
> Nice idea, but apparently "NUL" is magical to command.com.  fopen() in
> the MSC libraries certainly doesn't do anything useful with "NUL" or
> "NUL:"
> (1)  /dev/null doesn't work, but /dev/nul *does*.  
>      (Ick!  It works empirically, but I don't know if I trust MS not to
>      change it, as it sounds like a bug.)

"NUL" is a real device in MS-DOS.  There is a regular device driver
for it, as well as CON LPTx COMx.  By convention, DOS allows you to
specify \DEV\xxx (ex: \DEV\CON) or xxx: (ex: LPT1:) as well as just
xxx (ex: COM3).  There *used* to be a DOS call that made the \DEV\
part mandatory, so you could have a file called CON and a device
called \DEV\CON, but they took that away, so it's just optional now.
They may decide to remove the \DEV\ option completely.  Their standard
convention for device names is NUL or NUL: .

To prove this, try DIR > NUL and then DIR.

Disclaimer: I don't have "Windows", so if it screws up the NUL device
then Windows is at fault, not my information.

DJ
dj@ctron.com
Technical Details
Message-ID: <1474@balrog.ctron.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!wuarchive!uunet!samsung!balrog!ctron.com
References: <1991Apr30.162028.7771@sq.sq.com> <6690@bwdls58.bnr.ca> <1991May7.213347.709@sq.sq.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!wuarchive!uunet!samsung!balrog!ctron.com
From: dj@ctron.com (DJ Delorie)
Newsgroups: comp.windows.ms.programmer,comp.os.msdos.programmer
Subject: Re: What to do about stdin, stdout, and stderr under Windows 3.0?
Keywords: Missing in action
Message-ID: <1474@balrog.ctron.com>
Date: 8 May 91 13:34:00 GMT
References: <1991Apr30.162028.7771@sq.sq.com> <6690@bwdls58.bnr.ca> <1991May7.213347.709@sq.sq.com>
Sender: news@balrog.ctron.com
Reply-To: dj@ctron.com
Followup-To: comp.windows.ms.programmer
Organization: None whatsoever
Lines: 27
Nntp-Posting-Host: bragi