Path: utzoo!attcan!uunet!husc6!rutgers!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.sys.ibm.pc Subject: Re: How to determine stdin/out redirection Message-ID: <234377e4@ralf> Date: 30 Sep 88 13:02:44 GMT Sender: netnews@pt.cs.cmu.edu Lines: 17 In-Reply-To: <12265@steinmetz.ge.com> In article <12265@steinmetz.ge.com>, dixon@control.steinmetz (walt dixon) writes: }DOS opens the console device in the boot process. SFN=0 corresponds to }the console device. Command.com reopens the console device for StdIn }and StdOut. The JFT entries corresponding to StdIn and StdOut (JFT[0]] }and JFT[1] respectively) will contain a 0 in the absence of redirection. }By looking within the SFT entry, one can actually find the name of the }device/file. Unfortunately, any path name information is lost after }the file is opened. This must vary from version to version, because for DOS 3.1, SFN[0] is AUX and SFN[1] is CON. In the absence of redirection, the first five entries in the JFT are 1, 1, 1, 0, and 2. -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=- Voice: (412) 268-3053 (school) ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: Ralf Brown 1:129/31 Disclaimer? I |Ducharm's Axiom: If you view your problem closely enough claimed something?| you will recognize yourself as part of the problem.