Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!att!ihlpb!psfales From: psfales@ihlpb.ATT.COM (Fales) Newsgroups: comp.sys.ibm.pc Subject: Re: MS-DOS puzzle #1 Keywords: stderr stdin stdout command.com Message-ID: <10309@ihlpb.ATT.COM> Date: 25 Apr 89 03:09:39 GMT References: <6893@bsu-cs.bsu.edu> <2936@ihuxy.ATT.COM> <2535@maccs.McMaster.CA> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 34 In article <2535@maccs.McMaster.CA>, cs3b3aj@maccs.McMaster.CA (Three More Exams) writes: > > DOS 2.* and up added file handle support, and define five handles which > your program automatically receives: > 0: Standard input, CON by default > 1: Standard output, CON by default > 2: Standard error, always connected to CON > 3: Auxiliary, usually connected to COM1 > 4: List device (PRN), usually connected to LPT1 > > So DOS _does_ have stderr, and if you write a C program which outputs > to stderr it will work without the compiler having to translate your output > statements into BIOS calls. Score one more for the MKS toolkit. I never realized that it could do this, until someone pointed it out recently, but I just tried it and it works: you can redirect stderr, stdprn (and presumably stdaux) from the MKS shell, using exactly the the same syntax you would on a *NIX system. i n e w s f i l l -- Peter Fales AT&T, Room 5B-414 2000 N. Naperville Rd. UUCP: ...att!ihlpb!psfales Naperville, IL 60566 Domain: psfales@ihlpb.att.com work: (312) 979-8031