[Asterisk-cvs] asterisk asterisk.c,1.61,1.62

markster at lists.digium.com markster at lists.digium.com
Tue Mar 23 16:59:16 CST 2004


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

Modified Files:
	asterisk.c 
Log Message:
Improve ast_safe_system


Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- asterisk.c	21 Mar 2004 18:15:37 -0000	1.61
+++ asterisk.c	23 Mar 2004 21:55:46 -0000	1.62
@@ -168,8 +168,8 @@
 		for (x=STDERR_FILENO + 1; x<4096;x++) {
 			close(x);
 		}
-		res = system(s);
-		exit(res);
+		res = execl("/bin/sh", "/bin/sh", "-c", s, NULL);
+		exit(1);
 	} else if (pid > 0) {
 		for(;;) {
 			res = wait4(pid, &status, 0, &rusage);




More information about the svn-commits mailing list