
Trouble using SPAWN function
I am trying to spawn a process using Turbo C 2.0 where
the executable I am spawning requires the pipe character <
to define an input file. In other words, on the command
line I would execute the program as follows:
progname < inputfil.txt
Within my program, I have tried to call the progname.exe
executable by using the spawnle function as follows:
spawnle(P_WAIT,"progname","progname","<","inputfil.txt",NULL);
With the spawn function shown above, the progname program
complains that "<" and "inputfil.txt" are invalid arguments
yet when I run progname from the command line it works fine.
Other arguments that don't use the "<" character work fine
with the spawnle function. Any clues as to how to do this?
I'm assuming that since the "<" character is really a DOS function,
spawn doesn't know how to handle it. I would also assume that
the same problem would be had with the "| more" addition to
some commands.
Thanks for any help,
Dave
-----------------------------------------------------
Dave Kingma 450 Canterbury St.
Sr. Research Engineer Christiansburg, VA 24073
Fiber Optic Products
Litton Poly-Scientific
1213 N. Main St.
(703)-552-3011 x326 Amateur Radio: WA4RDI