in reply to Re^2: Perl Alarm Not Working
in thread Perl Alarm Not Working
the LWP stuff will be [interuptable]
You sure?
When I run the following two one liners, 'here' is printed after 30 seconds--when the server times out--not after 10 as it would be if the alarm had interupted the socket read.
C:\test>start /b perl -MIO::Socket -E"$s=IO::Socket::INET->new(Listen=>1,LocalPort=>12345);$c=$s->accept; +sleep 30" C:\test>perl -MIO::Socket -E"$s=IO::Socket::INET->new('localhost:12345');eval{alarm 10;<$s>};pri +nt'here'" here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl Alarm Not Working
by afoken (Chancellor) on Dec 19, 2010 at 22:16 UTC | |
by BrowserUk (Patriarch) on Dec 19, 2010 at 22:36 UTC | |
by ikegami (Patriarch) on Dec 19, 2010 at 23:25 UTC | |
by BrowserUk (Patriarch) on Dec 19, 2010 at 23:43 UTC | |
by ikegami (Patriarch) on Dec 20, 2010 at 00:28 UTC | |
|