On Dec 12, 2007 10:57 PM, NewbeeUnix <[EMAIL PROTECTED]> wrote: > Sorry for replying late... > The task that I want to achieve is to catch the HUP signal and send > notification about the process. But due to addition of sybase::ctlib > it catches the signal and my program fails. > Another issue is that sybase::ctlib is used throughout in our project > and I cannot change it just for this... > My process runs as a daemon and when it starts up it creates a file > containing pid of it. So that indicates the process is up and runing. > But when the m/c is shutdown, HUP signals are sent to all process > runinig and I want to track it and delete the pid file created. But > its not happeining.... > Is there any other way to achive this.... > > Thanks a lot. snip
That sounds like an abuse of SIGHUP*. SIGHUP is supposed to be sent by the OS when the controlling terminal disconnects (as would happen when someone on a modem Hangs UP). What you are describing is more suited to SIGTERM** which is sent to processes to politely tell them to stop when possible (as in TERMinate). * http://en.wikipedia.org/wiki/SIGHUP ** http://en.wikipedia.org/wiki/SIGTERM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/