in reply to Re: stdin-socket without fork()??
in thread stdin-socket without fork()??
And I kept getting the same results, select returns immediately with nothing ready. So I decided that maybe it had something to do with the IO in the Windows NT console. So I copied that script over to my linux box (at home) and ran it there, and, well, it worked perfectly.use strict; use warnings; my ($rin, $rout, $nfound); $rin = ''; vec($rin, fileno(STDIN), 1) = 1; $nfound = select($rout = $rin, undef, undef, 5); syswrite(STDOUT, "We stop here...\n");
|
|---|