in reply to Re^2: Using forks and threads
in thread Using forks and threads

Are you expecting this faux-system() call to take a long time? Do you care what it returns?

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^4: Using forks and threads
by ColinHorne (Sexton) on Jul 21, 2006 at 13:20 UTC
    Potentially yes to both - it could well take a long time, and I'd like to check the error code, just in case. Although - would this make a difference? I'm guessing it's not a question of how long the child will run after the exec(), but how long after the fork() it takes to exec(), and if a different thread gets a chance to run (that is, assuming that forking on a unix-like system duplicates threads).