From: Mark Spencer Date: Fri, 27 Feb 2004 06:56:08 +0000 (+0000) Subject: Ignore ECHILD in app_system X-Git-Tag: 1.0.0-rc1~1031 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f111e2d3a68ffb90a163aa41f30821c8c6b5f2e;p=thirdparty%2Fasterisk.git Ignore ECHILD in app_system git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2266 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_system.c b/apps/app_system.c index 3378602fe4..47f16a8fc5 100755 --- a/apps/app_system.c +++ b/apps/app_system.c @@ -53,13 +53,15 @@ static int system_exec(struct ast_channel *chan, void *data) LOCAL_USER_ADD(u); /* Do our thing here */ res = system((char *)data); - if (res < 0) { + if ((res < 0) && (errno != ECHILD)) { ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data); res = -1; } else if (res == 127) { ast_log(LOG_WARNING, "Unable to execute '%s'\n", (char *)data); res = -1; } else { + if (res < 0) + res = 0; if (res && ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid)) chan->priority+=100; res = 0;