Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site microsoft.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!microsoft!markz
From: markz@microsoft.UUCP (Mark Zbikowski)
Newsgroups: net.micro.pc
Subject: RE: redirection
Message-ID: <8690@microsoft.UUCP>
Date: Tue, 12-Jun-84 03:34:58 EDT
Article-I.D.: microsoft.8690
Posted: Tue Jun 12 03:34:58 1984
Date-Received: Wed, 13-Jun-84 00:23:25 EDT
Organization: Microsoft Corporation
Lines: 19

Here are some answers to a recent question and comment:

	"How can I open the console in such a manner that it is not redirected
	and no apparent buffering?"

Just like *NIX, you may open a device and place the channel into raw mode.
After this point, any I/O you do will be done directly to the device with no
special character processing at all.  This means no ^S/^Q, printer echoing or
^C checking (remember break-on still checks at system-call entry).  The
conversion to raw mode is imperfectly described in the IBM manual under the
IOCTL system call.  In particular, you must set the "ISBIN" bit.

	"Use handle 2 as it is immune from redirection"

Not quite true.  More correctly: "At the present time, there is no way to
redirect stderr from the command line". In a manner much like *NIX, MSDOS
allows a program to control the environment of its child.  For handles, the
child inherits the parents set of open files.  If the parent closes handle 2
and reopens it as file foo, then the child will get file foo.