~ubuntu-branches/ubuntu/trusty/libanyevent-perl/trusty-proposed

« back to all changes in this revision

Viewing changes to t/68_poe_03_child.t

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-05-08 15:22:47 UTC
  • mfrom: (1.4.16)
  • Revision ID: package-import@ubuntu.com-20120508152247-flmxmqnyonk0nqhi
Tags: 7.000-1
* New upstream release
* Email change: Alessandro Ghedini -> ghedo@debian.org
* Refresh fix-spelling.patch
* Drop use-tlsv1-in-test.patch (fixed upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
   unless ($pid) {
47
47
      print "ok ${it}2 # child $$\n";
 
48
 
 
49
      # POE hits a race condition when the child dies too quickly
 
50
      # because it checks for child exit before installing the signal handler.
 
51
      # seen in version 1.352 - earlier versions had the same bug, but
 
52
      # polled for child exits regularly, so only caused a delay.
 
53
      sleep 1 if $AnyEvent::MODEL eq "AnyEvent::Impl::POE";
 
54
 
48
55
      POSIX::_exit 3;
49
56
   }
50
57
   my $w = AnyEvent->child (pid => $pid, cb => sub {
55
62
 
56
63
   $cv->recv;
57
64
 
58
 
   my $pid2 = fork || POSIX::_exit 7;
 
65
   my $pid2 = fork || do {
 
66
      sleep 1 if $AnyEvent::MODEL eq "AnyEvent::Impl::POE";
 
67
      POSIX::_exit 7;
 
68
   };
59
69
 
60
70
   my $cv2 = AnyEvent->condvar;
61
71