Re: 0.3003+cygwin+perl 5.8.5

2004-12-13 Thread Leif Gustafson
Rocco Caputo wrote:
The problem is probably in the test program itself.  I've had problems
with this test on different systems.
I haven't noticed this test failing on previous versions of POE, but 
maybe it's a new test, I haven't checked.

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.
The intersting thing is that I followed the code through nonblocking() 
in the test.  In that function, $handle-blocking(0) is definitely 
called, as $^0 neq MSWin32 on cygwin.  Maybe it doesn't work properly 
though on cygwin.I'll try and look at this further at a later time.

--
Leif Gustafson


Re: PoCo HTTP Client not releasing sockets

2004-12-13 Thread Mathieu Longtin
Done. I submitted it, its bug #8846.

The test only works on Linux, but I've seen the problem
occur on windows as well. Anybody knows how to tell how
many file descriptors a process has using perl calls?

-Mathieu

 If you turn it into a Test::More style test, 
 I'll add it to Client::HTTP's tests.  That'll 
 fairly ensure that the problem gets fixed 
 before the next release.

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





__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250


Re: PoCo HTTP Client not releasing sockets

2004-12-13 Thread Rocco Caputo
On Mon, Dec 13, 2004 at 01:58:18PM -0800, Mathieu Longtin wrote:
 Done. I submitted it, its bug #8846.
 
 The test only works on Linux, but I've seen the problem
 occur on windows as well. Anybody knows how to tell how
 many file descriptors a process has using perl calls?
 
 -Mathieu

Process an HTTPS request.  When it's over, open a file, check
fileno(HANDLE), and close it.  Loop a few times.  An increasing file
descriptor number would indicate a leak.

Thanks for the RT ticket, and the attached test.

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


Re: 0.3003+cygwin+perl 5.8.5

2004-12-13 Thread Rocco Caputo
On Sun, Dec 12, 2004 at 02:09:07PM -0900, Leif Gustafson wrote:
 Rocco Caputo wrote:
 
 The problem is probably in the test program itself.  I've had problems
 with this test on different systems.
 
 I haven't noticed this test failing on previous versions of POE, but 
 maybe it's a new test, I haven't checked.

It is a new test.  POE's tests were expanded for the 0.30 release.

 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.
 
 The intersting thing is that I followed the code through nonblocking() 
 in the test.  In that function, $handle-blocking(0) is definitely 
 called, as $^0 neq MSWin32 on cygwin.  Maybe it doesn't work properly 
 though on cygwin.I'll try and look at this further at a later time.

In that case, try changing the test in nonblocking() so it falls
through to the POSIX code on Cygwin?

  ...
unless ($^O eq MSWin32) {
  if ($] = 5.008 and $^O ne Cygwin) {
$handle-blocking(0);
  }
  else {
# Long, drawn out, POSIX way.
  ...

I can commit that for the next release if it works.

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