[asterisk-dev] Module to Asterisk function Compiler Issue question

Kevin P. Fleming kpfleming at digium.com
Tue Aug 2 10:24:52 CDT 2011


On 08/02/2011 10:14 AM, Mike Myhre wrote:
>
>> It's doing exactly what the exec() family of functions is supposed to
>> do; replace the current executable image in the process with a
>> different one and then execute it. If you want to execute the shell
>> script in a child process, you have to fork() first... but you'd be
>> better off to use ast_safe_system() which handles quite a few other
>> nasty details for you as well.
>
> That worked perfectly. I was sure I remembered from my UNIX days that
> exec and spawn functions would just create a child process without the
> fork, but apparently not. All is good with my module now and it has been
> a good learning experience. Thank you for your help!!

You are quite welcome; when you are ready, use your new-found knowledge 
to start helping address open issues in Asterisk 1.8 or later and we'll 
all benefit :-)

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list