[asterisk-commits] file: trunk r45596 - in /trunk: ./
	main/asterisk.c
    asterisk-commits at lists.digium.com 
    asterisk-commits at lists.digium.com
       
    Wed Oct 18 14:05:54 MST 2006
    
    
  
Author: file
Date: Wed Oct 18 16:05:52 2006
New Revision: 45596
URL: http://svn.digium.com/view/asterisk?rev=45596&view=rev
Log:
Merged revisions 45595 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r45595 | file | 2006-10-18 17:03:34 -0400 (Wed, 18 Oct 2006) | 2 lines
Don't modify things if we are using vfork as this is very bad and may cause unexpected behavior (issue #7970 reported by Nick Gavrikov)
........
Modified:
    trunk/   (props changed)
    trunk/main/asterisk.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?rev=45596&r1=45595&r2=45596&view=diff
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Wed Oct 18 16:05:52 2006
@@ -643,7 +643,9 @@
 int ast_safe_system(const char *s)
 {
 	pid_t pid;
+#ifdef HAVE_WORKING_FORK
 	int x;
+#endif
 	int res;
 	struct rusage rusage;
 	int status;
@@ -658,11 +660,13 @@
 #endif	
 
 	if (pid == 0) {
+#ifdef HAVE_WORKING_FORK
 		if (ast_opt_high_priority)
 			ast_set_priority(0);
 		/* Close file descriptors and launch system command */
 		for (x = STDERR_FILENO + 1; x < 4096; x++)
 			close(x);
+#endif
 		execl("/bin/sh", "/bin/sh", "-c", s, (char *) NULL);
 		exit(1);
 	} else if (pid > 0) {
    
    
More information about the asterisk-commits
mailing list