ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.22 by root, Sun Dec 31 11:54:43 2006 UTC vs.
Revision 1.23 by root, Wed Mar 7 17:37:24 2007 UTC

247 247
248no warnings; 248no warnings;
249use strict; 249use strict;
250use Carp; 250use Carp;
251 251
252our $VERSION = '2.51'; 252our $VERSION = '2.52';
253our $MODEL; 253our $MODEL;
254 254
255our $AUTOLOAD; 255our $AUTOLOAD;
256our @ISA; 256our @ISA;
257 257
386 or Carp::croak "required option 'pid' is missing"; 386 or Carp::croak "required option 'pid' is missing";
387 387
388 $PID_CB{$pid}{$arg{cb}} = $arg{cb}; 388 $PID_CB{$pid}{$arg{cb}} = $arg{cb};
389 389
390 unless ($WNOHANG) { 390 unless ($WNOHANG) {
391 $CHLD_W = AnyEvent->signal (signal => 'CHLD', cb => \&_child_wait);
392 $WNOHANG = eval { require POSIX; &POSIX::WNOHANG } || 1; 391 $WNOHANG = eval { require POSIX; &POSIX::WNOHANG } || 1;
393 } 392 }
394 393
394 unless ($CHLD_W) {
395 $CHLD_W = AnyEvent->signal (signal => 'CHLD', cb => \&_child_wait);
395 # child could be a zombie already 396 # child could be a zombie already
396 $PID_IDLE ||= AnyEvent->timer (after => 0, cb => \&_child_wait); 397 $PID_IDLE ||= AnyEvent->timer (after => 0, cb => \&_child_wait);
398 }
397 399
398 bless [$pid, $arg{cb}], "AnyEvent::Base::Child" 400 bless [$pid, $arg{cb}], "AnyEvent::Base::Child"
399} 401}
400 402
401sub AnyEvent::Base::Child::DESTROY { 403sub AnyEvent::Base::Child::DESTROY {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines