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 13:03:23 GMT Organization: Deja.com - Before you buy. Lines: 57 Message-ID: <87p46p$e4u$1@nnrp1.deja.com> References: NNTP-Posting-Host: 193.15.174.253 X-Article-Creation-Date: Tue Feb 08 13:03:23 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; TUCOWS) X-Http-Proxy: 1.0 x35.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 Thanks for your answers. On the not possible in DOS though, it would be possible to have a starter program that runs a popen(gets.exe|backend.exe) where gets.c is something like char *s; while (1) gets(s); I have tested this and indeed s always contains the latest output string that backend.exe has output on screen. gets can of course have a bigger loop and thus process the s string in any matter while the backend.exe runs and prints it out. It would be fine though if gets could also make the call to backend.exe, instead of having a separate caller program. Any comment on this ? It seams that the non multitasking in DOS can be overridden, at least some ? In article , djgpp AT delorie DOT com wrote: > > On Mon, 7 Feb 2000 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 library docs. > > > And then I need the calling program to proceed while the called program > > executes, how do I do this ? > > On plain DOS, you can't. On Windows, run the subsidiary program like > this: > > system("start prog.exe"); > > > a last question, which is not really essential is how can I read the > > output from the called program from the calling program ? > > Use `popen' and `pclose' from the library. (Note that this won't work > with the above "start" trick.) > Sent via Deja.com http://www.deja.com/ Before you buy.