Jeff Trawick wrote:

How is SIGALRM used specifically?

e.g.: eval { POSIX::sigaction(SIGALRM, POSIX::SigAction->new(sub { die "alarm" })) or die "Error setting SIGALRM handler: $!\n"; alarm 2; potentially_long_running_process() alarm 0; }; do_something() if $@ && $@ =~ /alarm/;

Is there some thread-aware service which works sort of like the thread-unaware alarm() call which will send SIGALRM to a specific thread?

Nope. but if the signal is sent by the same thread that catches it, it's still not guaranteed that it'll get it?


SIGALRM is an asynchronous signal which can be delivered on any thread
that does not have the signal specifically blocked; if the user code
is just expecting their operation on the current thread to be
interrupted when the SIGALRM signal is generated, &deity; help them;
potentially some thread-aware code is sending SIGALRM to a specific
thread; it would be helpful to understand the testcase better

Understood. it's true even if the signal is sent by the same thread that catches it? See the example above for the test case.


--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to