Um, fork is what makes the children run in parallel. If that isn't happening here, then your children probably aren't doing much (since you aren't using wait or waitpid, which can be used to make the parent wait children). Doing some trick to make the children to appear more like they are running in parallel will just slow things down.
If you just want to see that they are running in parallel, then insert a sleep 5 in your child code.
- tye (but my friends call me "Tye")In reply to (tye)Re: A Quick fork theory question
by tye
in thread A Quick fork theory question
by E-Bitch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |