r20130 - in /trunk/libpoe-perl: CHANGES META.yml debian/changelog lib/POE.pm lib/POE/Kernel.pm lib/POE/Pipe.pm lib/POE/Resource/FileHandles.pm t/30_loops/00_base/wheel_accept.pm t/30_loops/00_base/wheel_run.pm t/90_regression/merijn-sigchld-system.t

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Mon May 19 07:34:59 UTC 2008


Author: tincho-guest
Date: Mon May 19 07:34:59 2008
New Revision: 20130

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20130
Log:
New upstream release.

Modified:
    trunk/libpoe-perl/CHANGES
    trunk/libpoe-perl/META.yml
    trunk/libpoe-perl/debian/changelog
    trunk/libpoe-perl/lib/POE.pm
    trunk/libpoe-perl/lib/POE/Kernel.pm
    trunk/libpoe-perl/lib/POE/Pipe.pm
    trunk/libpoe-perl/lib/POE/Resource/FileHandles.pm
    trunk/libpoe-perl/t/30_loops/00_base/wheel_accept.pm
    trunk/libpoe-perl/t/30_loops/00_base/wheel_run.pm
    trunk/libpoe-perl/t/90_regression/merijn-sigchld-system.t

Modified: trunk/libpoe-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/CHANGES?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/CHANGES (original)
+++ trunk/libpoe-perl/CHANGES Mon May 19 07:34:59 2008
@@ -1,3 +1,56 @@
+===================================
+2008-05-11T22:30:51.597024Z v1_0002
+===================================
+
+  2008-05-11 22:29:43 (r2325) by rcaputo; poe/lib/POE.pm M
+
+    Bump version for release.
+
+  2008-05-11 21:28:17 (r2324) by rcaputo
+  poe/lib/POE/Pipe.pm M; poe/lib/POE/Resource/FileHandles.pm M
+
+    Clean up the F_GETFL/F_SETFL mess a little. 
+
+  2008-05-11 20:51:44 (r2323) by rcaputo
+  poe/t/30_loops/00_base/wheel_run.pm M
+
+    Increase the timeout a little. Seeing some test failures due to
+    timeouts. 
+
+  2008-05-11 20:45:25 (r2322) by rcaputo
+  poe/t/30_loops/00_base/wheel_accept.pm M
+
+    Increase timeout for my slow VirtualPC test system.
+
+  2008-05-11 20:36:05 (r2321) by rcaputo
+  poe/t/90_regression/merijn-sigchld-system.t M
+
+    Actually, we must skip 4 tests if /bin/true does not exist. 
+
+  2008-04-28 18:10:04 (r2320) by rcaputo; poe/lib/POE/Kernel.pm M
+
+    Link the sig_child() documentation to the USE_SIGCHLD documentation
+    per Marc Lehmann's feedback. 
+
+  2008-04-28 06:16:20 (r2319) by rcaputo; poe/lib/POE/Kernel.pm M
+
+    Per Marc Lehmann's feedback, I have documented how to avoid a
+    potential race condition when catching child processes with
+    sig_child(). Basically, if you want sig_child() to catch a process,
+    call the method in the same event handler that forked the process.
+    Otherwise POE::Kernel may reap the process before sig_child() is
+    called. 
+
+  2008-04-26 09:13:50 (r2318) by rcaputo; poe/lib/POE/Kernel.pm M
+
+    Document how to avoid the run-wasn't-called warning. Thanks to Marc
+    Lehmann for reminding me to document it. 
+
+  2008-04-20 21:10:54 (r2317) by rcaputo
+  poe/t/30_loops/00_base/wheel_run.pm M
+
+    Increase the timeout in a test to avoid false errors.
+
 ===================================
 2008-04-19T22:26:06.023137Z v1_0001
 ===================================

Modified: trunk/libpoe-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/META.yml?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/META.yml (original)
+++ trunk/libpoe-perl/META.yml Mon May 19 07:34:59 2008
@@ -1,6 +1,6 @@
 ---
 name: POE
-version: 1.0001
+version: 1.0002
 author:
   - 'Rocco Caputo <rcaputo at cpan.org>'
 abstract: A portable networking and multitasking framework.
@@ -22,7 +22,7 @@
 provides:
   POE:
     file: lib/POE.pm
-    version: 1.0001
+    version: 1.0002
   POE::Component:
     file: lib/POE/Component.pm
     version: 1.2311
@@ -70,7 +70,7 @@
     version: 1.2220
   POE::Kernel:
     file: lib/POE/Kernel.pm
-    version: 1.2313
+    version: 1.2320
   POE::Loop:
     file: lib/POE/Loop.pm
     version: 1.2280
@@ -103,7 +103,7 @@
     version: 1.2220
   POE::Pipe:
     file: lib/POE/Pipe.pm
-    version: 1.2274
+    version: 1.2324
   POE::Pipe::OneWay:
     file: lib/POE/Pipe/OneWay.pm
     version: 1.2220
@@ -130,7 +130,7 @@
     version: 1.2222
   POE::Resource::FileHandles:
     file: lib/POE/Resource/FileHandles.pm
-    version: 1.2312
+    version: 1.2324
   POE::Resource::SIDs:
     file: lib/POE/Resource/SIDs.pm
     version: 1.2245

Modified: trunk/libpoe-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/debian/changelog?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/debian/changelog (original)
+++ trunk/libpoe-perl/debian/changelog Mon May 19 07:34:59 2008
@@ -1,9 +1,10 @@
-libpoe-perl (2:1.0001-2) UNRELEASED; urgency=low
+libpoe-perl (2:1.0002-1) UNRELEASED; urgency=low
 
   * Fixed typo in debian/copyright.
   * Updated my email address.
-
- -- Martín Ferrari <tincho at debian.org>  Mon, 12 May 2008 13:21:57 -0300
+  * New upstream release.
+
+ -- Martín Ferrari <tincho at debian.org>  Mon, 19 May 2008 04:17:04 -0300
 
 libpoe-perl (2:1.0001-1) unstable; urgency=low
 

Modified: trunk/libpoe-perl/lib/POE.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/lib/POE.pm?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/lib/POE.pm (original)
+++ trunk/libpoe-perl/lib/POE.pm Mon May 19 07:34:59 2008
@@ -1,4 +1,4 @@
-# $Id: POE.pm 2314 2008-04-19 22:18:35Z rcaputo $
+# $Id: POE.pm 2325 2008-05-11 22:29:43Z rcaputo $
 # Copyrights and documentation are after __END__.
 
 package POE;
@@ -7,8 +7,8 @@
 use Carp qw( croak );
 
 use vars qw($VERSION $REVISION);
-$VERSION = '1.0001'; # NOTE - Should be #.#### (four decimal places)
-$REVISION = do {my($r)=(q$Revision: 2314 $=~/(\d+)/);sprintf"1.%04d",$r};
+$VERSION = '1.0002'; # NOTE - Should be #.#### (four decimal places)
+$REVISION = do {my($r)=(q$Revision: 2325 $=~/(\d+)/);sprintf"1.%04d",$r};
 
 sub import {
   my $self = shift;

Modified: trunk/libpoe-perl/lib/POE/Kernel.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/lib/POE/Kernel.pm?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/lib/POE/Kernel.pm (original)
+++ trunk/libpoe-perl/lib/POE/Kernel.pm Mon May 19 07:34:59 2008
@@ -1,11 +1,11 @@
-# $Id: Kernel.pm 2313 2008-04-19 20:01:20Z rcaputo $
+# $Id: Kernel.pm 2320 2008-04-28 18:10:04Z rcaputo $
 
 package POE::Kernel;
 
 use strict;
 
 use vars qw($VERSION);
-$VERSION = do {my($r)=(q$Revision: 2313 $=~/(\d+)/);sprintf"1.%04d",$r};
+$VERSION = do {my($r)=(q$Revision: 2320 $=~/(\d+)/);sprintf"1.%04d",$r};
 
 use POSIX qw(:fcntl_h :sys_wait_h);
 use Errno qw(ESRCH EINTR ECHILD EPERM EINVAL EEXIST EAGAIN EWOULDBLOCK);
@@ -2945,6 +2945,17 @@
 run() will not return until every session has ended.  This includes
 sessions that were created while run() was running.
 
+POE::Kernel will print a strong message if a program creates sessions
+but fails to call run().  If the lack of a run() call is deliberate,
+you can avoid the message by calling it before creating a session.
+run() at that point will return immediately, and POE::Kernel will be
+satisfied.
+
+  use POE;
+  POE::Kernel->run(); # silence the warning
+  POE::Session->create( ... );
+  exit;
+
 =head3 run_one_timeslice
 
 run_one_timeslice() dispatches any events that are due to be
@@ -4342,10 +4353,10 @@
     # ...
   }
 
-SIGCHLD is not handled by registering a C<%SIG> handler, although it may
-be in the future.  For now, POE polls for child processes using a
-non-blocking C<waitpid()> call.  This is much more portable and reliable
-than setting C<$SIG{CHLD}>, although it's somewhat less responsive.
+By default, SIGCHLD is not handled by registering a C<%SIG> handler.
+Rather, waitpid() is called periodically to test for child process
+exits.  See the experimental L<USE_SIGCHLD> option if you would prefer
+child processes to be reaped in a more timely fashion.
 
 =head4 SIGPIPE
 
@@ -4514,13 +4525,18 @@
 the PROCESS_ID.
 
 A session may register as many sig_child() handlers as necessary, but
-there may only be one per PROCESS_ID.
+a session may only have one per PROCESS_ID.
 
 sig_child() watchers are one-shot.  They automatically unregister
 themselves once the EVENT_NAME has been delivered.
 
 sig_child() watchers keep a session alive for as long as they are
 active.  This is unique among signal watchers.
+
+Programs that wish to reliably reap child processes should be sure to
+call sig_child() before returning from the event handler that forked
+the process.  Otherwise POE::Kernel may have an opportunity to call
+waitpid() before an appropriate event watcher has been registered.
 
 sig_chid() does not return a meaningful value.
 

Modified: trunk/libpoe-perl/lib/POE/Pipe.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/lib/POE/Pipe.pm?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/lib/POE/Pipe.pm (original)
+++ trunk/libpoe-perl/lib/POE/Pipe.pm Mon May 19 07:34:59 2008
@@ -1,4 +1,4 @@
-# $Id: Pipe.pm 2274 2008-02-25 05:56:36Z rcaputo $
+# $Id: Pipe.pm 2324 2008-05-11 21:28:17Z rcaputo $
 
 # Common routines for POE::Pipe::OneWay and ::TwoWay.  This is meant
 # to be inherited.  This is ugly, messy code right now.  It fails
@@ -9,7 +9,7 @@
 use strict;
 
 use vars qw($VERSION);
-$VERSION = do {my($r)=(q$Revision: 2274 $=~/(\d+)/);sprintf"1.%04d",$r};
+$VERSION = do {my($r)=(q$Revision: 2324 $=~/(\d+)/);sprintf"1.%04d",$r};
 
 use Symbol qw(gensym);
 use IO::Socket qw(
@@ -17,7 +17,7 @@
   pack_sockaddr_in unpack_sockaddr_in inet_aton
   SOMAXCONN SO_ERROR
 );
-use POSIX qw(:fcntl_h);
+use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
 use Errno qw(EINPROGRESS EWOULDBLOCK);
 
 # CygWin seems to have a problem with socketpair() and exec().  When
@@ -61,9 +61,10 @@
 # Provide dummy constants for MSWin32, so things at least compile.
 
 BEGIN {
-  if ($^O eq 'MSWin32') {
-    eval '*F_GETFL = sub () { 0 };';
-    eval '*F_SETFL = sub () { 0 };';
+  eval 'F_GETFL';
+  if ($@) {
+    *F_GETFL = sub () { 0 };
+    *F_SETFL = sub () { 0 };
   }
 }
 

Modified: trunk/libpoe-perl/lib/POE/Resource/FileHandles.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/lib/POE/Resource/FileHandles.pm?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/lib/POE/Resource/FileHandles.pm (original)
+++ trunk/libpoe-perl/lib/POE/Resource/FileHandles.pm Mon May 19 07:34:59 2008
@@ -1,4 +1,4 @@
-# $Id: FileHandles.pm 2312 2008-04-19 05:49:16Z rcaputo $
+# $Id: FileHandles.pm 2324 2008-05-11 21:28:17Z rcaputo $
 
 # Manage file handles, associated descriptors, and read/write modes
 # thereon.
@@ -6,7 +6,7 @@
 package POE::Resource::FileHandles;
 
 use vars qw($VERSION);
-$VERSION = do {my($r)=(q$Revision: 2312 $=~/(\d+)/);sprintf"1.%04d",$r};
+$VERSION = do {my($r)=(q$Revision: 2324 $=~/(\d+)/);sprintf"1.%04d",$r};
 
 # These methods are folded into POE::Kernel;
 package POE::Kernel;
@@ -19,9 +19,10 @@
 # aren't used if we're RUNNING_IN_HELL, but Perl needs to see them.
 
 BEGIN {
-  if (RUNNING_IN_HELL) {
-    eval '*F_GETFL = sub () { 0 };';
-    eval '*F_SETFL = sub () { 0 };';
+  eval 'F_GETFL';
+  if ($@) {
+    *F_GETFL = sub () { 0 };
+    *F_SETFL = sub () { 0 };
   }
 }
 

Modified: trunk/libpoe-perl/t/30_loops/00_base/wheel_accept.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/t/30_loops/00_base/wheel_accept.pm?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/t/30_loops/00_base/wheel_accept.pm (original)
+++ trunk/libpoe-perl/t/30_loops/00_base/wheel_accept.pm Mon May 19 07:34:59 2008
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# $Id: wheel_accept.pm 2206 2007-07-25 04:44:21Z rcaputo $
+# $Id: wheel_accept.pm 2322 2008-05-11 20:45:25Z rcaputo $
 
 # Exercises the ListenAccept wheel.
 
@@ -56,7 +56,7 @@
   );
 
   $heap->{accept_count} = 0;
-  $_[KERNEL]->delay( got_timeout => 15 );
+  $_[KERNEL]->delay( got_timeout => 30 );
 }
 
 sub listener_stop {

Modified: trunk/libpoe-perl/t/30_loops/00_base/wheel_run.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/t/30_loops/00_base/wheel_run.pm?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/t/30_loops/00_base/wheel_run.pm (original)
+++ trunk/libpoe-perl/t/30_loops/00_base/wheel_run.pm Mon May 19 07:34:59 2008
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# $Id: wheel_run.pm 2291 2008-03-22 22:21:42Z rcaputo $
+# $Id: wheel_run.pm 2323 2008-05-11 20:51:44Z rcaputo $
 
 use strict;
 use lib qw(./mylib ../mylib);
@@ -104,7 +104,7 @@
   my $flag = 0;
   $SIG{ALRM} = sub { die "alarm\n" };
   eval {
-    alarm(10);
+    alarm(30);
     while (<STDIN>) {
       chomp;
       if (/flag (\d+)/) { $flag = $1 }
@@ -123,7 +123,7 @@
 # }}}
 
 { # manage a global timeout {{{
-  sub TIMEOUT_HALFTIME () { 10 }
+  sub TIMEOUT_HALFTIME () { 15 }
   my $timeout_initialized = 0;
   my $timeout_poked = 0;
   my $timeout_refs = 0;

Modified: trunk/libpoe-perl/t/90_regression/merijn-sigchld-system.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-perl/t/90_regression/merijn-sigchld-system.t?rev=20130&op=diff
==============================================================================
--- trunk/libpoe-perl/t/90_regression/merijn-sigchld-system.t (original)
+++ trunk/libpoe-perl/t/90_regression/merijn-sigchld-system.t Mon May 19 07:34:59 2008
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# $Id: merijn-sigchld-system.t 2307 2008-03-31 11:46:07Z nothingmuch $
+# $Id: merijn-sigchld-system.t 2321 2008-05-11 20:36:05Z rcaputo $
 # vim: filetype=perl
 
 
@@ -13,13 +13,16 @@
 
 use POE;
 
-use Test::More tests => 4;
+use constant TESTS => 4;
+use Test::More tests => TESTS;
 
 my $command = "/bin/true";
 
 SKIP: {
   my @commands = grep { -x } qw(/bin/true /usr/bin/true);
-  skip( "Couldn't find a 'true' to run under system()", 3 ) unless @commands;
+  skip( "Couldn't find a 'true' to run under system()", TESTS ) unless (
+    @commands
+  );
 
   my $command = shift @commands;
 




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