Hi,
 
I am using Perl5.04 and right now, I do not have the option of upgrading to higher versions for political reasons within the org.
 
With perl 5.04, if I set up a $SIG{ALRM} handler, then I have noticed that my process some times gets into an infinite sleep while handling the ALRM signal. Find below the gdb trace... 
 
So, I was just wondering if there is any other method of async process notification that I can use for this scenario apart from Signals? Basically, my requirement is, I have a script which should keep on doing its job but after 300 secs of elapsed time of its execution, it should invoke/execute a routine and once finished executing that routine, return back to what it was doing before the routine execution (exactly like how an interrupt is handled at a higher level). I tried doing this with alarm 300; but got into process hanging issues sometimes.
 
Any help here...?
 
Thanks,
Arijit
 
PS: Here is where my process got stuck while handling SIGLARM.
 
(gdb) where
#0  0x55192d19 in __lll_mutex_lock_wait () from /lib/tls/libc.so.6
#1  0x5511e1cc in _L_mutex_lock_2723 () from /lib/tls/libc.so.6
#2  0x0000000f in ?? ()
#3  0x086a7890 in ?? ()
#4  0x55119e75 in malloc () from /lib/tls/libc.so.6
#5  0x08078c32 in saferealloc ()
#6  0x08085915 in Perl_sv_grow ()
#7  0x08088190 in Perl_sv_catpvn ()
#8  0x08080820 in Perl_pp_concat ()
#9  0x08080218 in Perl_runops ()
#10 0x08058d14 in perl_call_sv ()
#11 0x0807dd9c in Perl_sighandler ()
#12 <signal handler called>
#13 0x551528f5 in fork () from /lib/tls/libc.so.6
#14 0x080a533a in Perl_pp_system ()
#15 0x08080218 in Perl_runops ()
#16 0! x0805861a in perl_run ()
---Type <return> to continue, or q <return> to quit---
#17 0x08056ba0 in main ()
(gdb)
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /proc/14491/exe, process 14491
eurika214>
 
 


Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to