Re: Passing shell control to another app



On 2006-09-26, Allistar <a@xxxxx> wrote:
Hi all,

Part way through the execution of the application it executes another
instance of the same app (using fork followed by execl) and then the
original instance exits. When the original instance exists the user sees
the shell prompt, yet the second instance is still running and still
outputting to the shell.

the easiest fix is to wait() for the child to exit before returning to the
shell.

that's what the shell is doing waiting for your process to end...

The other alternative would be to branch the other way when you fork (if
you know beforehand which branch will finish first)

Bye.
Jasen
.