Mail Archives: djgpp/2000/02/08/07:06:12
What I have done so far is a little program that looks like this:
include <stdio.h>
main...
{
char *s;
while(1)
{gets(s);
printf(">>%s",s)}
}
And I start it with gets|backend.exe
this works fine, the program can read the output from backend.exe fine,
and print it out correct.
Now, I would not like to use the "pipe" to start it, and a solution
would be to have another program that is little less than
main...
{
start_dos_program("gets.exe|backend.exe")
}
What my question essentially was, were:
what is the name and sysntax of START_DOS_PROGRAM ?, which I have
gotten some hints on, and also:
can I somehow get rid of the extra program that starts the piped two
programs, that would be fine since t would save me one executable or
one .bat file. The caller program must continue to execute and NOT wait
until the backend has terminated.
I am almost there now, but if someone could help me a little further it
would be much appreciated.
In article <j49v9s0k63pdk3osq8k9ib8i6c609cl4fe AT 4ax DOT com>,
REPLYTOd_yerrick AT hotmail DOT comNO2CANNEDHAM wrote:
> on Mon, 07 Feb 2000 20:51:09 GMT, arcadepreserv AT hotmail DOT com wrote:
>
> >I am looking for a dosexex("myprog.exe");
> >
> >type of command, it must be there but what is the syntax and include
> >needed ?
>
> Look up system() and spawn*() in the libc docs.
>
> >And then I need the calling program to proceed while the
> >called program executes, how do I do this ?
>
> By not using DOS. DOS can't multitask.
>
> >a last question, which is not really essential is how can I read the
> >output from the called program from the calling program ?
>
> By redirecting stdout to a temporary file.
>
> foo.exe > filename
>
> --
> Damian Yerrick http://yerricde.tripod.com/
> Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
> AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
> View full sig: http://www.rose-hulman.edu/~yerricde/sig.html
>
Sent via Deja.com http://www.deja.com/
Before you buy.
- Raw text -