note
xiper
Hmm, you appear to be right. I found this in Tk::fileevent:
<p><em>The readable and writable event handlers for a file are independent, and may be created and deleted separately. However, there may be at most one readable and one writable handler for a file at a given time in a given interpreter. If fileevent is called when the specified handler already exists in the invoking interpreter, the new callback replaces the old one.</em></p>
Not sure if "file" means filehandle tho'...
<p>
Note also how the last callback gets fired 4 times, but only twice with data waiting... Different combinations of prints in the child result in generally inconsistent behaviour (that is, incidentally, consistent with blocking/buffering/deadlock type problems).
<p>
My output:
<code>
read_stderr()
sysread() got 9 bytes:
[stderr1
]
read_stderr()
sysread() got 9 bytes:
[stderr2
]
read_stderr()
sysread() got 0 bytes:
[]
read_stderr()
sysread() got 0 bytes:
[]
</code>
<div class="pmsig">
<div class="pmsig-232711">
<p>
- ><iper
<code>
use japh; print;
</code>
</div>
</div>
339244
339281