]> granicus.if.org Git - check/commitdiff
* try to detect CK_FORK problem on non-POSIX right after getenv() call
authorcpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 1 Jan 2009 01:23:31 +0000 (01:23 +0000)
committercpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 1 Jan 2009 01:23:31 +0000 (01:23 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@518 64e312b2-a51f-0410-8e61-82d0ca0eb02a

src/check_run.c

index 0e37178ae14f879d19c3f5588f275873b3f62cf8..c02c30bc89c88ee9d4c4a6ad6655836e7f0cdcce 100644 (file)
@@ -522,8 +522,14 @@ enum fork_status srunner_fork_status (SRunner *sr)
       return CK_FORK;
     if (strcmp (env,"no") == 0)
       return CK_NOFORK;
-    else
+    else {
+#ifdef _POSIX_VERSION
       return CK_FORK;
+#else /* _POSIX_VERSION */
+      eprintf("This version does not support fork", __FILE__, __LINE__);
+      return CK_NOFORK;
+#endif /* _POSIX_VERSION */
+    }
   } else
     return sr->fstat;
 }