Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!tut.cis.ohio-state.edu!osu-cis!att!cbnewsh!mbb From: mbb@cbnewsh.ATT.COM (martin.b.brilliant) Newsgroups: comp.sys.ibm.pc Subject: Re: MS-DOS puzzle #1 Message-ID: <238@cbnewsh.ATT.COM> Date: 22 Apr 89 12:38:49 GMT References: <6893@bsu-cs.bsu.edu> Organization: AT&T Bell Laboratories Lines: 28 From article <6893@bsu-cs.bsu.edu>, by dhesi@bsu-cs.bsu.edu (Rahul Dhesi): > Question: Why does COMMAND.COM allow redirection of standard > input and standard output, but not standard error? > > Answer: MS-DOS, unlike UNIX, doesn't have a fork() system call; > therefore the MS-DOS command interpreter, unlike the > UNIX shell, can't redirect standard error. > > THE PUZZLE. Does the above make any sense? If it does, why? If it > does not, what is the real answer to the question? No, it does not make any sense. In the first place, there is no such thing as "UNIX". UNIX(R) is a trademark of AT&T. There are UNIX systems. MS-DOS is not a UNIX system and never was one. If MS-DOS can redirect standard input and standard output without fork(), it could also redirect standard error if the designers of MS-DOS wanted it to. The real answer to the question is that the designers of MS-DOS thought it would be good to allow redirection of standard input and standard output, but that error messages should always go to the screen. So they wrote MS-DOS to direct all error messages to the screen. M. B. Brilliant Marty AT&T-BL HO 3D-520 (201) 949-1858 Holmdel, NJ 07733 att!cbnewsh!mbb or mbb@cbnewsh.ATT.COM Disclaimer: Opinions stated herein are mine unless and until my employer explicitly claims them; then I lose all rights to them.