[Asterisk-cvs] asterisk/apps app_system.c,1.6,1.7

markster at lists.digium.com markster at lists.digium.com
Fri Feb 27 02:06:51 CST 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv11637/apps

Modified Files:
	app_system.c 
Log Message:
Ignore ECHILD in app_system


Index: app_system.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_system.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- app_system.c	19 Oct 2003 11:06:59 -0000	1.6
+++ app_system.c	27 Feb 2004 06:56:08 -0000	1.7
@@ -53,13 +53,15 @@
 	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;




More information about the svn-commits mailing list