always use fork() when available
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 18 Sep 2006 19:58:27 +0000 (19:58 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 18 Sep 2006 19:58:27 +0000 (19:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43216 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index e8bf957..e981a76 100644 (file)
@@ -698,10 +698,10 @@ int ast_safe_system(const char *s)
 #if defined(HAVE_WORKING_FORK) || defined(HAVE_WORKING_VFORK)
        ast_replace_sigchld();
 
-#ifdef HAVE_WORKING_VFORK
-       pid = vfork();
-#else
+#ifdef HAVE_WORKING_FORK
        pid = fork();
+#else
+       pid = vfork();
 #endif 
 
        if (pid == 0) {