Date: Wed, 13 Nov 1996 08:29:11 +0200 (IST) From: Eli Zaretskii To: Paul Koshevoy

Cc: djgpp AT delorie DOT com Subject: Re: system(...) , spawnl(...) In-Reply-To: <566b2b$9cl@news.cc.utah.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 11 Nov 1996, Paul Koshevoy wrote: > ins system(const char *) and int spawnl(int, char *, NULL) > functions. The problem is when I spawn a child program with either of > this functions the execution never gets back to parent . The child > process terminates but the parent process does not resume. So where does this leave your machine? Do you get the DOS command prompt, or are you stuck and need a reboot, or what? > Here is a part of my code : > > char * ext=filename[pos]->get_part2(0); > if( !strcmp(ext,"bat") || !strcmp(ext,"BAT") || !strcmp(ext,"EXE") > || !strcmp(ext,"COM") || !strcmp(ext,"exe") || !strcmp(ext,"EXE")) > { > panel1->kill(); > panel2->kill(); > int result=system(filename[pos]->get_filename()); > panel1->refresh(); > panel2->refresh(); > } Is this a C++ program? If it's C, then you can't say "int i = system" in the middle of a block. If this is a typo, please post the exact excerpt from your source code (minor typos could obscure important clues to the cause of your problem). You might also consider writing a trivial 10-liner which calls `system' with any string you like (which should work), then working your way back from that trivial program to your code above to see what's different.