Article View: alt.msdos.programmer
Article #1142Re: Detecting DOS redirection requests.
From: fritz-o-matic
Date: Sun, 03 Sep 1995 09:52
Date: Sun, 03 Sep 1995 09:52
22 lines
1063 bytes
1063 bytes
"David B. Ferguson" <microtsk@fox.nstn.ca> wrote: -> How does one tell the user has requested DOS redirection from within ->his application. Using C BTW. -> i.e. MyApp > UserText.txt ->Regards, ->David- -> Dear David , in all cases of command line line redirection, the file assignments are changed by the shell, not by the program. The program does not know where its input comes from nor where its output goes, so long as it uses file 0 for input and 1 and 2 for output. See K&R (2nd edition) 7.1 and 8.1 for further details. Fritz All God's chillun got algorithm!
Technical Details
Message-ID:
<42bg3q$dr0@ixnews6.ix.netcom.com>Path:
arc1-ca.pugleaf.net!ix.netcom.com!netnewsReferences:
<92011.microtsk@fox.nstn.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!ix.netcom.com!netnews From: n4jvp@ix.netcom.com (fritz-o-matic) Newsgroups: alt.msdos.programmer,comp.lang.c,comp.os.msdos.programmer Subject: Re: Detecting DOS redirection requests. Date: Sun, 03 Sep 1995 09:52:02 GMT Organization: Netcom Message-ID: <42bg3q$dr0@ixnews6.ix.netcom.com> References: <92011.microtsk@fox.nstn.ca> NNTP-Posting-Host: ix-nas-nh1-10.ix.netcom.com X-Newsreader: Forte Free Agent 1.0.82