in reply to exec function does not return command prompt

I didn't see where anybody actually explained the source of your problem (just suggest alternatives).

The problem is that you have the parent doing exec and have the child just say "In test1..." and then "All done!". The child exits, not the parent. The parent continues on running test2.pl. So you won't get a prompt back until test2.pl exits.

Update: Actually, I believe I am mistaken and that Crackers2 is correct.

- tye        

  • Comment on Re: exec function does not return command prompt (!child)

Replies are listed 'Best First'.
Re^2: exec function does not return command prompt (!child)
by casman46 (Initiate) on Aug 18, 2014 at 12:53 UTC

    Tye: Thank you for your explanation of my problem. As I noted in my reply to Crackers2, it is obvious that I do not understand how the fork function works! However, it seems odd that only one command prompt appears even though both scripts exit.