Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #24892] alarm not working with Windows XP

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

Jan 12, 2004, 7:03 PM

Post #1 of 2 (45 views)
Permalink
[perl #24892] alarm not working with Windows XP

# New Ticket Created by "Wu, Ann"
# Please include the string: [perl #24892]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=24892 >


Hi,



I have a perl script for Windows XP using alarm, but the alarm doesn't
seem to work. I found [perl #24739] is another discussion for this
problem. However, Terry Grieb said it supports to work for XP. I'm
enclosing a segment of my code that setup & catch the alarm signal.
Would you please take a look and let me know if I have a bug in my code,
or alarm doesn't work for Windows XP either. Thank you very much!!!



==== cut sample code =====



$SIG{ALRM} = sub {

close SOCK;

print "timeout\n";

die;

};



.... Setup socket ... (this part work)

alarm 10; # alarm wait for 10 seconds.

.... Write to the socket & wait for reply from the socket, but the
socket never replied, and the $SIG{ALRM} subroutine never was called.



==== end sample code ====


ikegami at adaelis

Apr 30, 2012, 11:02 AM

Post #2 of 2 (44 views)
Permalink
Re: [perl #24892] alarm not working with Windows XP [In reply to]

On Mon, Apr 30, 2012 at 11:56 AM, bulk 88 via RT
<perlbug-followup [at] perl>wrote:

> The console is synchronous IO. OS calls can not be interrupted. There is
> no concept of signals on Windows except for "Alertable IO"(TM). Whatever
> the fix, it won't be through the CRT.


But why isn't the "signal" raised after readline returns?

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.