Xref: utzoo comp.windows.ms.programmer:2331 comp.os.msdos.programmer:5064 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!mcsun!inesc!unl!unl!jpc From: jpc@fct.unl.pt (Jose Pina Coelho) Newsgroups: comp.windows.ms.programmer,comp.os.msdos.programmer Subject: Re: What to do about stdin, stdout, and stderr under Windows 3.0? Message-ID: Date: 8 May 91 14:17:43 GMT References: <1991Apr30.162028.7771@sq.sq.com> <6690@bwdls58.bnr.ca> <1991May7.213347.709@sq.sq.com> Sender: news@fct.unl.pt (USENET News System) Organization: Universidade Nova de Lisboa -- Lisbon, Portugal Lines: 37 In-Reply-To: dak@sq.sq.com's message of 7 May 91 21:33:47 GMT 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 One should say MSDOS's NUL: <={Sort-of}=> *IX's /dev/null Nice idea, but apparently "NUL" is magical to command.com. Nope, it's in the ibmbio.sys/ibmdos.sys files in pcdos (io.sys/msdos.sys in msdos). fopen() in the MSC libraries certainly doesn't do anything useful with "NUL" or "NUL:" Sounds like MicroSoft C trying to dodge MicroSoft DOS (cute, he ?) Probably it checks for dev names. (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.) That is due to quite a bug (sorry, feature (i think it's documented, but i'm not sure), if a filename is 3 characters long, dos will (try to?) interpret it as dev (ignoreing the missing ':'), so \dev\nul has a filename with 3 chars (nul) and you can use it. Ever tried to mess arround (rmdir) with a directory called AUX, or CON, or ... or even NUL (3) Try NUL (Doesn't work.) Try NUL:, dos is *plain* *weird*. -- Jose Pedro T. Pina Coelho | BITNET/Internet: jpc@fct.unl.pt Rua Jau N 1, 2 Dto | UUCP: ...!mcsun!unl!jpc 1300 Lisboa, PORTUGAL | Home phone: (+351) (1) 640767 - If all men were brothers, would you let one marry your sister ?