Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!decwrl!hplabs!hpfcdc!hpldola!hpctdlb!hpctdls!wei From: wei@hpctdls.HP.COM (Bill Ives) Newsgroups: comp.lang.c Subject: Re: redirecting a child process output to a file Message-ID: <2150008@hpctdls.HP.COM> Date: 3 Aug 89 13:42:19 GMT References: <8430@techunix.BITNET> Organization: Hewlett-Packard CTD, Colo. Spgs. Lines: 19 The reason your redirection technic does not work is because the '>' operator is a DOS command shell ( among other shells ) operator... Thus, your command works at the command prompt because command.com parses it out and sets up the redirection before starting the process ... As it stands now, your spawn command will pass the > charater as a command line parameter to the process which could look for it-- bad way to do this though. To do this without the shell you will have to set up redirection yourself -- look up Dos Dup Handle and Dos Close Handle for information about this... If you have access to older ket notes this technic has been covered in excessive detail-- I have covered it at least three times myself. Email me if you can't figure it out and I'll send you an example.. Bill Ives HP CTD #include /* I could never speak for HP */