Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Signal to a sleeping Perl program

by afoken (Canon)
on Jan 17, 2020 at 15:36 UTC ( #11111529=note: print w/replies, xml ) Need Help??


in reply to Signal to a sleeping Perl program

I have [a] [...] script that [...] sleeps [...] If I add an ALRM signal handler, the ALRM stops working

One problem is in the man page sleep(3), at least on Linux:

Bugs

sleep() may be implemented using SIGALRM; mixing calls to alarm(2) and sleep() is a bad idea.

Using longjmp(3) from a signal handler or modifying the handling of SIGALRM while sleeping will cause undefined results.


program keeps running!!!! Any thoughts?

Multiple exclamation marks ...

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11111529]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2020-02-25 19:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (113 votes). Check out past polls.

    Notices?