r19612 - in /trunk/libhttp-server-simple-perl/debian: changelog patches/0002-Pipe-version-parent-waits-for-the-child-to-say-OK.patch

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Wed May 7 13:02:43 UTC 2008


Author: tincho-guest
Date: Wed May  7 13:02:42 2008
New Revision: 19612

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=19612
Log:
Try again with the patch: make provisions for interrupted select() call to
be manually restarted.

Modified:
    trunk/libhttp-server-simple-perl/debian/changelog
    trunk/libhttp-server-simple-perl/debian/patches/0002-Pipe-version-parent-waits-for-the-child-to-say-OK.patch

Modified: trunk/libhttp-server-simple-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-server-simple-perl/debian/changelog?rev=19612&op=diff
==============================================================================
--- trunk/libhttp-server-simple-perl/debian/changelog (original)
+++ trunk/libhttp-server-simple-perl/debian/changelog Wed May  7 13:02:42 2008
@@ -1,3 +1,10 @@
+libhttp-server-simple-perl (0.33-2) UNRELEASED; urgency=low
+
+  * Try again with the patch: make provisions for interrupted select() call to
+    be manually restarted.
+
+ -- Martín Ferrari <tincho at debian.org>  Wed, 07 May 2008 10:01:07 -0300
+
 libhttp-server-simple-perl (0.33-1) unstable; urgency=low
 
   [ gregor herrmann ]

Modified: trunk/libhttp-server-simple-perl/debian/patches/0002-Pipe-version-parent-waits-for-the-child-to-say-OK.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-server-simple-perl/debian/patches/0002-Pipe-version-parent-waits-for-the-child-to-say-OK.patch?rev=19612&op=diff
==============================================================================
--- trunk/libhttp-server-simple-perl/debian/patches/0002-Pipe-version-parent-waits-for-the-child-to-say-OK.patch (original)
+++ trunk/libhttp-server-simple-perl/debian/patches/0002-Pipe-version-parent-waits-for-the-child-to-say-OK.patch Wed May  7 13:02:42 2008
@@ -13,7 +13,7 @@
  
  use vars qw($VERSION $bad_request_doc);
  $VERSION = '0.33';
-@@ -215,15 +216,31 @@ Run the server in the background. return
+@@ -215,15 +216,36 @@ Run the server in the background. return
  
  sub background {
      my $self  = shift;
@@ -28,8 +28,13 @@
 +    if ($child) { # parent
 +        my $s = IO::Select->new;
 +        $s->add($readfh);
-+        my @ready = $s->can_read(5);
-+        die("child unresponsive for 5 seconds") if !@ready;
++	my $now = time; my $left = 5;
++	my @ready;
++	while(not @ready and $left > 0) {
++		@ready = $s->can_read($left);
++		$left = time - $now;
++	}
++        die("child unresponsive for 5 seconds") if(not @ready);
 +        my $response = <$readfh>;
 +        chomp $response;
 +        die("child is confused: answer '$response' != 'OK'")
@@ -46,7 +51,7 @@
      $self->run();
  }
  
-@@ -263,6 +280,7 @@ sub run {
+@@ -263,6 +285,7 @@ sub run {
  	$self->after_setup_listener();
          *{"$pkg\::run"} = $self->_default_run;
      }
@@ -54,7 +59,7 @@
  
      local $SIG{HUP} = sub { $SERVER_SHOULD_RUN = 0; };
  
-@@ -400,6 +418,15 @@ sub _process_request {
+@@ -400,6 +423,15 @@ sub _process_request {
          }
  }
  




More information about the Pkg-perl-cvs-commits mailing list