If it is a separate thread, is there any way to have STDOUT for thread A be different from thread B?
From the activestate documentation, the STDOUT filehandle should have been duped for the child thread but I don't believe that's what I'm seeing. I can make a change in the parent to STDOUT that affects the child's STDOUT. Can anyone explain what I'm missing?
active state documentation http://www.xav.com/perl/lib/Pod/perlfork.html
"Open filehandles
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."
In reply to Re^5: Forks, Pipes and Exec (file descriptors)
by diabelek
in thread Forks, Pipes and Exec
by diabelek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |