Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Signal to a sleeping Perl program

by afoken (Chancellor)
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
Domain Nodelet?
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 chilling in the Monastery: (4)
As of 2023-09-24 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?