| line |
true |
false |
branch |
|
70
|
0 |
7 |
$profile{'block_write'} ? : |
|
|
0 |
7 |
$profile{'block_exc'} ? : |
|
76
|
0 |
7 |
exists $profile{'timeout'} ? : |
|
77
|
1 |
6 |
if (@{$$self{'timers'};}) |
|
80
|
0 |
1 |
unless $$timer{'active'} |
|
82
|
1 |
0 |
if $timeout > $sleep |
|
84
|
0 |
1 |
if $timeout < 0 |
|
88
|
1 |
6 |
if (@{$$self{'timers'};}) |
|
91
|
0 |
1 |
if not $$timer{'active'} or $time < $$timer{'alert'} |
|
96
|
1 |
6 |
unless ($n > 0) |
|
97
|
0 |
1 |
if ($$self{'debug'}) |
|
99
|
0 |
0 |
if ($n < 0) |
|
111
|
71 |
3 |
unless $r or $w or $e |
|
113
|
9 |
0 |
if (exists $$self{'filenos'}{$i} and exists $$self{'ids'}{$$self{'filenos'}{$i}}) { } |
|
117
|
0 |
0 |
if $$self{'debug'} |
|
122
|
2 |
7 |
if ($$task{'callback'} and not $$task{'dead'}) |
|
126
|
6 |
3 |
if ($r and not $$task{'dead'}) |
|
128
|
3 |
3 |
if ($$task{'read'} > -1) |
|
129
|
0 |
3 |
$profile{'block_read'} ? : |
|
132
|
3 |
3 |
if ($$task{'read'} > 0) { } |
|
133
|
0 |
3 |
if $$self{'debug'} |
|
135
|
0 |
3 |
unless (defined $nbytes) |
|
136
|
0 |
0 |
unless $! == 11 |
|
140
|
3 |
0 |
unless defined $nbytes |
|
141
|
0 |
3 |
if $$self{'debug'} |
|
144
|
0 |
6 |
if $profile{'block_read'} |
|
145
|
6 |
0 |
if ($nbytes > 0) |
|
149
|
0 |
0 |
unless $$task{'pid'} |
|
152
|
3 |
0 |
if ($w and not $$task{'dead'}) |
|
153
|
3 |
0 |
unless (length $$task{'write_buffer'}) |
|
159
|
0 |
0 |
if $$self{'debug'} |
|
161
|
0 |
0 |
unless (defined $nbytes) |
|
162
|
0 |
0 |
unless $! == 11 |
|
165
|
0 |
0 |
if ($nbytes > 0) |
|
167
|
0 |
0 |
unless (length $$task{'write_buffer'}) |
|
175
|
0 |
0 |
if ($e and not $$task{'dead'}) |
|
176
|
0 |
0 |
if $$self{'debug'} |
|
183
|
7 |
0 |
if ($$self{'waitpid'}) |
|
185
|
0 |
0 |
unless $$self{'processes'}{$_} |
|
189
|
0 |
0 |
if ($task->can_read and $$task{'read'} > 0) |
|
195
|
0 |
0 |
unless (defined $nbytes) |
|
196
|
0 |
0 |
unless $! == 11 |
|
201
|
0 |
0 |
unless $nbytes |
|
203
|
0 |
0 |
if $notify |
|
231
|
0 |
0 |
if $task |
|
244
|
0 |
1 |
if $$self{'dead'} |
|
246
|
1 |
9 |
unless $_ |
|
247
|
0 |
9 |
if $IO::Events::FORK_MODE |
|
251
|
0 |
1 |
unless $_ |
|
262
|
0 |
1 |
if $@ |
|
302
|
0 |
10 |
unless defined $$self{'handle'} |
|
304
|
0 |
10 |
unless defined $$self{$_} |
|
306
|
9 |
1 |
unless defined $$self{'id'} |
|
308
|
0 |
10 |
if exists $$owner{'ids'}{$$self{'id'}} |
|
310
|
0 |
10 |
unless defined $fno |
|
312
|
10 |
0 |
unless ($$self{'nonblock'}) |
|
315
|
0 |
10 |
unless defined $fl |
|
316
|
0 |
10 |
unless fcntl $$self{'handle'}, 4, $fl | 2048 |
|
318
|
1 |
9 |
if ($$self{'write'}) |
|
322
|
7 |
3 |
if ($$self{'read'}) |
|
326
|
0 |
10 |
if ($$self{'exception'}) |
|
330
|
2 |
8 |
if defined $$self{'pid'} |
|
338
|
0 |
0 |
unless $#_ |
|
345
|
0 |
0 |
unless $#_ |
|
352
|
0 |
0 |
unless $#_ |
|
360
|
9 |
10 |
if $$self{'dead'} |
|
364
|
10 |
0 |
if defined $$self{'handle'} and $$self{'auto_close'} |
|
366
|
10 |
0 |
if (defined $$self{'owner'}) |
|
367
|
10 |
0 |
if (defined $$self{'fileno'}) |
|
373
|
2 |
8 |
if (defined $$self{'pid'}) |
|
376
|
1 |
1 |
unless @$p |
|
386
|
4 |
3 |
if $_[0]{'read_buffer'} =~ s/^([^\n]*\n)// |
|
401
|
3 |
0 |
if $$self{'owner'} and defined $$self{'fileno'} |
|
404
|
0 |
3 |
if (not defined $nbytes) { } |
|
|
3 |
0 |
elsif ($nbytes > 0) { } |
|
405
|
0 |
0 |
if $$self{'owner'} and $! != 11 |
|
406
|
0 |
0 |
if $! == 11 |
|
416
|
0 |
10 |
if ($discard) { } |
|
420
|
0 |
0 |
unless defined $self->write('') |
|
431
|
0 |
31 |
unless $IO::Events::Handle::events{$event} |
|
434
|
8 |
23 |
if (exists $$self{$event}) |
|
436
|
7 |
1 |
if $IO::Events::Handle::events{$event} == 1 or $$self{'event_flag'} |
|
438
|
1 |
23 |
if $self->can($event) |
|
444
|
0 |
0 |
if ($self) |
|
446
|
0 |
0 |
if defined $$self{'fileno'} |
|
447
|
0 |
0 |
if defined $$self{'pid'} |
|
448
|
0 |
0 |
if defined $$self{'process'} |
|
463
|
0 |
0 |
unless defined $profile{'process'} |
|
467
|
0 |
0 |
unless defined $pid |
|
486
|
0 |
0 |
unless defined $profile{'process'} |
|
490
|
0 |
0 |
unless defined $pid |
|
512
|
0 |
0 |
unless defined $pid |
|
513
|
0 |
0 |
unless ($pid) |
|
517
|
0 |
0 |
if $on_fork |
|
541
|
0 |
0 |
unless defined $pid |
|
542
|
0 |
0 |
unless ($pid) |
|
545
|
0 |
0 |
if $on_fork |
|
606
|
0 |
1 |
unless defined $pid |
|
608
|
0 |
1 |
unless ($pid) |
|
617
|
0 |
0 |
if $on_fork |
|
662
|
0 |
0 |
if ($_ eq 'read') { } |
|
|
0 |
0 |
elsif ($_ eq 'write') { } |
|
665
|
0 |
0 |
if $$self{'shadow'} |
|
672
|
1 |
1 |
if $_[0]{'dead'} |
|
673
|
1 |
0 |
if $_[0]{'shadow'} |
|
680
|
0 |
1 |
unless $$self{'shadow'} |
|
691
|
0 |
0 |
unless exec $_[0]{'process'} |
|
746
|
0 |
2 |
unless CORE::accept $handle, $$self{'handle'} |
|
765
|
0 |
2 |
if ($!) |
|
766
|
0 |
0 |
if $$self{'owner'} |
|
783
|
2 |
0 |
unless $profile{'handle'} |
|
784
|
0 |
2 |
unless socket $profile{'handle'}, 2, 1, getprotobyname 'tcp' |
|
787
|
2 |
0 |
unless ($profile{'nonblock'}) |
|
790
|
0 |
2 |
unless defined $fl |
|
791
|
0 |
2 |
unless fcntl $profile{'handle'}, 4, $fl | 2048 |
|
794
|
1 |
1 |
if (defined $profile{'connect'}) { } |
|
|
1 |
0 |
elsif (exists $profile{'listen'}) { } |
|
796
|
0 |
1 |
unless $iaddr = inet_aton($profile{'connect'}) |
|
799
|
1 |
0 |
if not $ok and $! == 11 || $! == 115 |
|
800
|
0 |
1 |
unless $ok |
|
802
|
0 |
1 |
unless setsockopt $profile{'handle'}, 1, 2, "\cA\000\000\000" |
|
806
|
0 |
1 |
unless defined $inet |
|
807
|
0 |
1 |
unless bind $profile{'handle'}, sockaddr_in($profile{'port'}, $inet) |
|
814
|
1 |
1 |
if $profile{'connect'} |
|
840
|
2 |
0 |
unless $profile{'handle'} |
|
841
|
0 |
2 |
unless socket $profile{'handle'}, 2, 2, getprotobyname 'udp' |
|
844
|
2 |
0 |
unless ($profile{'nonblock'}) |
|
847
|
0 |
2 |
unless defined $fl |
|
848
|
0 |
2 |
unless fcntl $profile{'handle'}, 4, $fl | 2048 |
|
853
|
0 |
2 |
unless defined $inet |
|
855
|
0 |
2 |
if ($profile{'broadcast'}) |
|
856
|
0 |
0 |
unless setsockopt $profile{'handle'}, 1, 6, "\cA\000\000\000" |
|
861
|
0 |
2 |
unless bind $profile{'handle'}, sockaddr_in($profile{'port'} || 0, $inet) |
|
871
|
1 |
0 |
unless defined $profile{'maxlen'} |
|
874
|
0 |
1 |
if $profile{'oob'} |
|
875
|
0 |
1 |
if $profile{'peek'} |
|
876
|
0 |
1 |
if $profile{'waitall'} |
|
877
|
0 |
1 |
if defined $profile{'nonblock'} and $profile{'nonblock'} == 0 |
|
882
|
0 |
1 |
unless (defined $host) |
|
898
|
0 |
1 |
if $profile{'oob'} |
|
899
|
0 |
1 |
if $profile{'dontroute'} |
|
900
|
0 |
1 |
if $profile{'eor'} |
|
901
|
0 |
1 |
if $profile{'eof'} |
|
907
|
0 |
1 |
unless (defined $ret) |
|
925
|
2 |
0 |
unless $profile{'handle'} |
|
926
|
0 |
2 |
unless socket $profile{'handle'}, 1, 1, 0 |
|
929
|
2 |
0 |
unless ($profile{'nonblock'}) |
|
932
|
0 |
2 |
unless defined $fl |
|
933
|
0 |
2 |
unless fcntl $profile{'handle'}, 4, $fl | 2048 |
|
936
|
1 |
1 |
if (defined $profile{'connect'}) { } |
|
|
1 |
0 |
elsif (exists $profile{'listen'}) { } |
|
937
|
0 |
1 |
unless connect $profile{'handle'}, pack_sockaddr_un($profile{'connect'}) |
|
940
|
0 |
1 |
unless bind $profile{'handle'}, pack_sockaddr_un($profile{'listen'}) |
|
947
|
1 |
1 |
if $profile{'connect'} |
|
966
|
0 |
1 |
unless defined $$self{$_} |
|
971
|
1 |
0 |
if $$self{'active'} |
|
979
|
0 |
0 |
if $$self{'dead'} |
|
995
|
0 |
0 |
if $active == $$self{'active'} |
|
996
|
0 |
0 |
$active ? : |
|
1003
|
0 |
1 |
if ($$self{'repetitive'}) { } |
|
1012
|
1 |
0 |
if (defined $$self{'on_tick'}) |
|
1014
|
0 |
1 |
if $$self{'event_flag'} |
|
1016
|
0 |
1 |
if $self->can('on_tick') |