Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: SIGALRM in perl

by anjultyagi (Novice)
on Jan 21, 2019 at 13:15 UTC ( [id://1228769]=note: print w/replies, xml ) Need Help??


in reply to Re: SIGALRM in perl
in thread SIGALRM in perl

Hi Shmem, Can we figure out why process received the SIGALRM any specific reason for that? If we handle that signal can we raise an exception and override the default operations.

Replies are listed 'Best First'.
Re^3: SIGALRM in perl
by haukex (Archbishop) on Jan 21, 2019 at 13:28 UTC
    Can we figure out why process received the SIGALRM any specific reason for that?

    You might try strace, e.g. strace -e trace=signal,alarm ..., but typically, SIGALRM is arranged by alarm (in Perl, alarm). (Update: Also note that "sleep may be internally implemented on your system with alarm.")

    If we handle that signal can we raise an exception and override the default operations.

    Yes, by setting a %SIG handler as shmem showed above. But I would recommend first trying to figure out where the signal is coming from in the first place.

      Unfortunately, the issue only occurring in a production environment, I don't face that issue in QA and UAT environment. I don't have much option in production to hold and validate.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found