On fredag, jan 17, 2003, at 23:51 Europe/Stockholm, Alberto Alonso wrote:

I'm sure that this is probably an FAQ (couldn't find anything
on my searches though).

All references establish that ithreads doesn't like signaling
too well, I've verified that as well :-)

Is there a substitute method of the ALRM based timeout?

In other words something similar to this:


	eval {
	    $| = 1;
	    local $SIG{ALRM} = sub { die 'timeout!' };
	    alarm($timeoutsec);
	    # DO SOMETHING HERE
	    $status = do_something();
	    alarm(0);
	};
	if(!$status) {
	    # Timed out
	    # HANDLE THE TIMEOUT PROPERLY
	}


Thanks,

Alberto

--
Alberto Alonso      General Manager      Global Gate Systems LLC.
(512) 260-2523                           http://www.ggsys.net
Collocation, monitoring, remote backups and consulting solutions

Not anything I am aware of, I don't know how such a thing would be implemented to allow a
signal to interrupt the perl code.

Arthur

Reply via email to