Test_Progs/HIDE/other_select2
raw| 1 | #! /usr/bin/perl -w |
| 2 | |
| 3 | use Shell::POSIX::Select; |
| 4 | |
| 5 | # Make sure that file-descriptor monitoring version of select |
| 6 | # doesn't get identified as loopy one |
| 7 | |
| 8 | $rout= $timeleft= $nfound= $wout= $eout= $timeout = 0; |
| 9 | $rin = $win = $ein = ''; |
| 10 | vec($rin,fileno(STDIN),1) = 1; |
| 11 | vec($win,fileno(STDOUT),1) = 1; |
| 12 | $ein = $rin | $win; |
| 13 | |
| 14 | ($nfound,$timeleft) = |
| 15 | select($rout=$rin, $wout=$win, $eout=$ein, $timeout); |