>From: [email protected]
[mailto:[email protected]] On Behalf Of Steve Edwards
>Subject: Re: [asterisk-users] Use of AGISIGHUP
>On Thu, 26 Aug 2010, Lee Archer wrote:
>> Hi, I am setting AGISIGHUP=no before running a Perl script via AGI but
>> it doesn?t seem to be doing anything as the script is still exiting on a
>> hangup and not completing properly. I am using 1.4.35 and have tried
>> various combinations. Can anyone shed any light on this?
>I'm just a 1.2 Luddite, so I've never seen AGISIGHUP and I think it's a
bad idea to protect lazy programmers :)
>Program defensively!
>Trap the HUP and do what is appropriate for your script -- even if that is
to ignore it.
>If the successful execution of your system depends on a setting, how long
will it take the next guy to figure out when the setting disappears
unexpectedly?
As usual, Steve is right. Here's a one-liner that should "fix" the problem
local $SIG{HUP} = 'IGNORE';
Does that make me lazy?
TIA.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users