Last week I was able to get the following work-around to avoid the symptom:
- edit the file:
./Event/Event.xs from the TK source
- comment out the following lines:
if (PerlIO_fileno(ip) != PerlIO_fileno(op))
{
croak("fileno not same for read %d and write %d",
PerlIO_fileno(ip) , PerlIO_fileno(op));
}
- recompile TK
- replace the file:
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/Tk/Event/Event.so
with the newly compiled version
For some reason, the writers of TK want the read and write file
descriptors to be the same, and when they are not, the program exits. I
am not using TK services to manage data IO at all, so I just commented
this section out. Its a quick and dirty fix that will suffice for my
needs, but may not be adequate in the general case.
With regard to providing code to perform actual IO, I have attached that
code to this update, but the actual crash happens before that code
executes. The program exits when the socket connects. To use the version
that attempts to transport data over the socket, run client2 instead of
test_client.
It is interesting that you are not able to reproduce the symptom. I
downloaded the most recent version of Fedora over the weekend and plan
on installing that on another computer sometime this week. I will try
the normal compile of TK in that environment to see if the symptom
disappears or not.
thanks for your efforts
On Sun May 14 03:03:09 2006, IMMUTE wrote:
Show quoted text> Gary, I have not been able to reproduce this error on my system (FC5,
> perl5.8.8 poe0.34_02 tk804.027) It would also help if your test case
> client would send some real data to pass through the filter.
>
> Are you still having a problem with the code in question, or did you get
> it resolved?
>
> On Tue Apr 25 20:39:38 2006, guest wrote:
> > perl version: v5.8.0
> > Tk version: 804.027
> > POE distribution filename: POE-0.3301.tar.gz
> > Operating system: Red Hat Linux 9.0
> > uname: 2.4.20-8
> > hardware: pentium 3 1ghz w/512MB RAM and 20GB hard disk
> >
> >
> > The included tarfile has the files that I have been writing. This
> > consists of a custom filter, a POE server and a client that makes a
> > socket connection to the server and transfers some data.
> >
> > The server file currently has a 'use Tk;' line. With that line in place,
> > the following is printed to the terminal as the server crashes. If the
> > 'use Tk;' line is commented out, the server operates as expected. The
> > crash occurs when the client attempts to make a socket connection.
> >
> >
> > Socket session stopped
> > Listen session stopped
> > fileno not same for read 5 and write 6 at
> > /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Tk/Event/IO.pm line 122.
> > (in cleanup) whoops; no tk file io object at
> > /usr/local/lib/perl5/site_perl/5.8.0/POE/Loop/Tk.pm line 115.
> >
> >
> > Thanks for the help
> >
> > Gary Krohmer
>
>