0.3003+cygwin+perl 5.8.5

2004-12-12 Thread Leif Gustafson
I have a problem with the tests on POE 0.3003 on cygwin running Windows 
XP with perl 5.8.5.  I don't believe it is a POE bug, but I am curious 
if any other cygwin users have experienced it.
Test 11 of 17 in 10_units/04_drivers/01_sysrw.t locks up perl.  I have 
traced the problem through to POE::Drivers::SysRW, in the flush method. 
  Running through the perl debugger, I have discovered that perl locks 
on the third call to syswrite in the loop.
Looking at the CVS diff of SysRW.pm, the only thing that has been added 
in that method since that last stable release of POE was line 140:
	$! = 0 if defined $wrote_count;
but I don't think this has anything to do with the problem, so I feel 
the problem is elsewhere.

Anyhow, since syswrite is hanging, my feeling is that this is a cygwin 
bug, or a cygwin perl bug.  Has anyone else had success with cygwin.  If 
so, please post what version of the cygwin dlls you are using and what 
version of perl.

--
Leif Gustafson


Re: 0.3003+cygwin+perl 5.8.5

2004-12-12 Thread Rocco Caputo
On Sat, Dec 11, 2004 at 11:04:48PM -0900, Leif Gustafson wrote:
 I have a problem with the tests on POE 0.3003 on cygwin running Windows 
 XP with perl 5.8.5.  I don't believe it is a POE bug, but I am curious 
 if any other cygwin users have experienced it.
 Test 11 of 17 in 10_units/04_drivers/01_sysrw.t locks up perl.  I have 
 traced the problem through to POE::Drivers::SysRW, in the flush method. 
   Running through the perl debugger, I have discovered that perl locks 
 on the third call to syswrite in the loop.
 Looking at the CVS diff of SysRW.pm, the only thing that has been added 
 in that method since that last stable release of POE was line 140:
   $! = 0 if defined $wrote_count;
 but I don't think this has anything to do with the problem, so I feel 
 the problem is elsewhere.
 
 Anyhow, since syswrite is hanging, my feeling is that this is a cygwin 
 bug, or a cygwin perl bug.  Has anyone else had success with cygwin.  If 
 so, please post what version of the cygwin dlls you are using and what 
 version of perl.

The problem is probably in the test program itself.  I've had problems
with this test on different systems.

The idea is to set the pipe non-blocking, and use Driver::SysRW to
flush as much data to the pipe as it will hold.  Eventually the pipe
fills up, and the driver's can't write anymore code is exercised.

It sounds like the pipe isn't really non-blocking, despite the
nonblocking() code in 01_drivers.t.  One thing to try is replacing
nonblocking() with $w-blocking(0).  You may need to use IO::Handle
first.

-- 
Rocco Caputo - http://poe.perl.org/