[asterisk-dev] [Code Review] SHELLEX() dialplan function

wdoekes reviewboard at asterisk.org
Mon Oct 8 02:43:18 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2061/#review7249
-----------------------------------------------------------



/trunk/funcs/func_shell.c
<https://reviewboard.asterisk.org/r/2061/#comment13988>

    +1 on ignoring the return value.



/trunk/funcs/func_shell.c
<https://reviewboard.asterisk.org/r/2061/#comment13986>

    if (waitpid(pid, &status, 0) > 0 && res == 0 && WIFEXITED(status)) {
        snprintf(sstatus, sizeof(sstatus), "%3d", WEXITSTATUS(status));
    
    
    Otherwise you get status 1024 => "102" (0x400) for e.g. return '4' (at least on my linux here).



/trunk/funcs/func_shell.c
<https://reviewboard.asterisk.org/r/2061/#comment13987>

    At least two tabs for this line continuation? Same in load_module().


- wdoekes


On Oct. 7, 2012, 3:41 p.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2061/
> -----------------------------------------------------------
> 
> (Updated Oct. 7, 2012, 3:41 p.m.)
> 
> 
> Review request for Asterisk Developers and Kevin Fleming.
> 
> 
> Summary
> -------
> 
> Following a discussion about capturing the return value as well as the output of a command, I came up with this.
> 
> 
> Diffs
> -----
> 
>   /trunk/funcs/func_curl.c 374635 
>   /trunk/funcs/func_odbc.c 374635 
>   /trunk/funcs/func_realtime.c 374635 
>   /trunk/funcs/func_shell.c 374635 
>   /trunk/funcs/func_strings.c 374635 
> 
> Diff: https://reviewboard.asterisk.org/r/2061/diff
> 
> 
> Testing
> -------
> 
> Compile testing only
> 
> 
> Thanks,
> 
> Tilghman
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121008/203aba70/attachment.htm>


More information about the asterisk-dev mailing list