Xref: utzoo comp.sys.ibm.pc.programmer:2298 alt.msdos.programmer:1835 Path: utzoo!attcan!uunet!mailrus!uwm.edu!cs.utexas.edu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!xrtll!silver From: silver@xrtll.uucp (Hi Ho Silver) Newsgroups: comp.sys.ibm.pc.programmer,alt.msdos.programmer Subject: Re: Redirecting to/from spawnxx()ed program? Keywords: redirect stdin/stdout Message-ID: <1990Jul7.145847.10261@xrtll.uucp> Date: 7 Jul 90 14:58:47 GMT References: <49978@iuvax.cs.indiana.edu> Reply-To: silver@xrtll.UUCP (Hi Ho Silver) Organization: Not around here, pal! Lines: 16 In article <49978@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes: $I believe that spawn...() doesn't start a command shell, which is what you $need to do redirection. There is another call, system() I think, which $does start a command shell and feeds the arguments to it. You could use $that. The arguments should be essentially a command line that is to be $fed to command.com, but I don't have my manuals at hand to check any of this. That's one way, yes; do something like system ("command_name < file_name"); The other way is to do the redirection yourself. I'm not sure of the exact procedure to do this, but if you look up the functions dup(), dup2() and freopen(), somewhere you should find the information you need. -- /Nikebo \ Nikebo says "Nikebo knows how to post. Just do it."\silver@xrtll/ /---------\_____________________________________________________\----------/ /yunexus!xrtll!silver (L, not 1)\ Hi Ho Silver \ just silver for short / /Silver: Ever Searching for SNTF \ Life sucks. \ someone buy me a BEER! /