I am wondering if there's a way that I can distinguish between different childs; is there a child number, like first child, second child etc?You mean, does the OS assign each process a unique number? It certainly does, the process ID. It's the return value of fork (in the parent).
But you already knew that, judging from your code.
In reply to Re: fork : distinguish between different child?
by JavaFan
in thread fork : distinguish between different child?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |