[comp.binaries.ibm.pc.d] Determining if there's redirection on the command line...

c164-bj@laertes.berkeley.edu (Derc Yamasaki) (03/28/91)

What's the preferred method of determining within a C program whether a user
has redirected stdout or stdin on the command line?  Interrogating an 'fstat'
structure's file mode works on my PC, but there must be a more elegant,
portable way of doing this, right?

Also, how can one redirect stderr to a file from a (DOS) command line?

Any help from you wizards would be greatly appreciated!


Derc
(new subscriber, hoping his first inquiry is received favorably)

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (03/31/91)

This is not about anything which has been or might be posted to c.b.i.p!
Please do not post replies, and if you must communicate with the original
poster, please mention that this is the wrong group.
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me