I'm expecting that calling system() from a thread would work fine most of the time, since the fork would duplicate all threads, etc, as expected, but would then exec() instantly after the fork. However, if this isn't atomic (eg: if the process received an interrupt just before exec()ing), one of the other threads might continue in the new fork before exec()ing, which certainly isn't what I'd want.
In reply to Re^2: Using forks and threads
by ColinHorne
in thread Using forks and threads
by ColinHorne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |