in reply to Re^2: How can I read DATA in parent and child?
in thread How can I read DATA in parent and child?
The docs on fork perlfork say that parent and child share the same seek pointer:
Any filehandles open at the time of the fork() will be dup()-ed. Thus, the files can be closed independently in the parent and child, but beware that the dup()-ed handles will still share the same seek pointer. Changing the seek position in the parent will change it in the child and vice-versa. One can avoid this by opening files that need distinct seek pointers separately in the child.So I find it surprising that this version works.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How can I read DATA in parent and child?
by choroba (Cardinal) on Feb 18, 2019 at 18:18 UTC | |
by Skeeve (Parson) on Feb 19, 2019 at 07:26 UTC | |
by choroba (Cardinal) on Feb 19, 2019 at 09:38 UTC | |
by Skeeve (Parson) on Feb 19, 2019 at 10:25 UTC | |
by tybalt89 (Monsignor) on Feb 19, 2019 at 16:41 UTC | |
| |
by Skeeve (Parson) on Feb 19, 2019 at 10:46 UTC | |
by tybalt89 (Monsignor) on Feb 20, 2019 at 10:33 UTC |