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

Mike Myhre digium at aeisecure.com
Tue Aug 2 10:14:56 CDT 2011


> 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!!

     Mike Myhre




More information about the asterisk-dev mailing list