Skip to content
Snippets Groups Projects
Commit 0f111e2d authored by Mark Spencer's avatar Mark Spencer
Browse files

Ignore ECHILD in app_system

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent a232d8e0
Branches
Tags
No related merge requests found
...@@ -53,13 +53,15 @@ static int system_exec(struct ast_channel *chan, void *data) ...@@ -53,13 +53,15 @@ static int system_exec(struct ast_channel *chan, void *data)
LOCAL_USER_ADD(u); LOCAL_USER_ADD(u);
/* Do our thing here */ /* Do our thing here */
res = system((char *)data); res = system((char *)data);
if (res < 0) { if ((res < 0) && (errno != ECHILD)) {
ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data); ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data);
res = -1; res = -1;
} else if (res == 127) { } else if (res == 127) {
ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data); ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data);
res = -1; res = -1;
} else { } else {
if (res < 0)
res = 0;
if (res && ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid)) if (res && ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
chan->priority+=100; chan->priority+=100;
res = 0; res = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment