From: arcadepreserv AT hotmail DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: How Do I start another DOS program from DJGPP ? Date: Tue, 08 Feb 2000 08:41:31 GMT Organization: Deja.com - Before you buy. Lines: 74 Message-ID: <87okrr$455$1@nnrp1.deja.com> References: <87nb7r$5gb$1 AT nnrp1 DOT deja DOT com> NNTP-Posting-Host: 193.15.174.253 X-Article-Creation-Date: Tue Feb 08 08:41:31 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; TUCOWS) X-Http-Proxy: 1.0 x41.deja.com:80 (Squid/1.1.22) for client 193.15.174.253 X-MyDeja-Info: XMYDJUIDkivik To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com What I have done so far is a little program that looks like this: include 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 , 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.