From: davecook AT home DOT com (David M. Cook) Newsgroups: comp.os.msdos.djgpp Subject: Re: After you read this PLEASE DONT FLAME ME! References: <361c290a DOT 0 AT news DOT softhouse DOT com> Organization: http://www.kernel-panic.com/links/devel.html Message-ID: User-Agent: slrn/0.9.5.3 (UNIX) Lines: 14 Date: Thu, 08 Oct 1998 05:20:45 GMT NNTP-Posting-Host: 24.0.189.179 NNTP-Posting-Date: Wed, 07 Oct 1998 22:20:45 PDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 7 Oct 1998 22:51:56 -0400, Joshua Tacey wrote: >How do you run a program inside a program? If you aren't interested in sending input or getting output use system(). Otherwise use popen(). Someone suggested one of the exec() calls, but that will exit the current program and not come back unless you use fork() to create another branch. >Like as the last part of your program, it runs another program. Then exec() would be appropriate, since it's the last thing to execute. Dave Cook