… | |
… | |
316 | return undef if $_[0] < 0; |
316 | return undef if $_[0] < 0; |
317 | |
317 | |
318 | # try to generate nice filehandles |
318 | # try to generate nice filehandles |
319 | my $sym = "IO::AIO::fd#$_[0]"; |
319 | my $sym = "IO::AIO::fd#$_[0]"; |
320 | local *$sym; |
320 | local *$sym; |
321 | open *$sym, "+<&=$_[0]" |
321 | |
|
|
322 | open *$sym, "+<&$_[0]" # usually under any unix |
|
|
323 | or open *$sym, "<&$_[0]" # cygwin needs this |
|
|
324 | or open *$sym, ">&$_[0]" # cygwin needs this |
322 | or return undef; |
325 | or return undef; |
323 | |
326 | |
324 | *$sym |
327 | *$sym |
325 | } |
328 | } |
326 | |
329 | |