But I'd also like to draw your attention to something not yet pointed out - you seem to believe that you can run code after calling exec(). That's incorrect - exec() replaces the process with a new one and never returns. Sometimes you'll see:
exec(...) or die(...);
But that's just there to handle the possiblity that exec() might fail. If exec() succeeds then that process won't be running your code anymore.
-sam
In reply to Re: Fork and wait question
by samtregar
in thread Fork and wait question
by chris68805
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |