version 1.35, 2002/03/26 04:37:59
|
version 1.36, 2002/03/27 04:07:02
|
Line 592 sub HandleInput
|
Line 592 sub HandleInput
|
} |
} |
} |
} |
|
|
|
# DoSelect: does a select with no timeout. On signal (errno == EINTR), |
|
# the select is retried until there are items in the returned |
|
# vectors. |
|
# |
|
# Parameters: |
|
# \$readvec - Reference to a vector of file descriptors to |
|
# check for readability. |
|
# \$writevec - Reference to a vector of file descriptors to check for |
|
# writability. |
|
# On exit, the referents are modified with vectors indicating which |
|
# file handles are readable/writable. |
|
# |
|
sub DoSelect { |
|
my $readvec = shift; |
|
my $writevec= shift; |
|
my $outs; |
|
my $ins; |
|
|
|
while (1) { |
|
my $nfds = select($outs = $$writevec, $ins = $$readvec, undef, undef); |
|
if($nfound) { |
|
$$readvec = $ins; |
|
$$writevec = $outs; |
|
return; |
|
} else { |
|
die "Select failed" unless $! == EINTR; |
|
} |
|
} |
|
} |
|
|
# handle($socket) deals with all pending requests for $client |
# handle($socket) deals with all pending requests for $client |
# |
# |
sub handle { |
sub handle { |