in reply to Re^2: Threads: How to share a FileHandle to Write
in thread Threads: How to share a FileHandle to Write
It looks like your C-runtime libraries or Perl implementation is broken(1).
I cannot reproduce your results on my platform:
The only logical thing for CLONE to do for an open filehandle is dup() or dup2(), and according to the man pages for those calls:
They share locks, file position pointers and flags; for example, if the file position is modified by using lseek on one of the descriptors, the position is also changed for the other.NAME dup, dup2 - duplicate a file descriptor SYNOPSIS #include <unistd.h> int dup(int oldfd); int dup2(int oldfd, int newfd); DESCRIPTION dup and dup2 create a copy of the file descriptor oldfd. After successful return of dup or dup2, the old and new descrip +tors may be used interchangeably.The two descriptors do not share the close-on-exec flag, howeve +r.
1. That is, your platform is exhibiting unspecified--thought clearly defined--behaviour.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Threads: How to share a FileHandle to Write
by gulden (Monk) on May 19, 2009 at 14:45 UTC | |
by BrowserUk (Patriarch) on May 19, 2009 at 15:28 UTC | |
by gulden (Monk) on May 19, 2009 at 17:06 UTC | |
by BrowserUk (Patriarch) on May 19, 2009 at 18:16 UTC | |
by gulden (Monk) on May 22, 2009 at 10:08 UTC | |
|