|
From: Jeremy F. <je...@go...> - 2004-01-06 21:46:42
|
CVS commit by fitzhardinge:
Make fork test deterministic.
M +4 -0 fork.c 1.4
M +0 -2 fork.stderr.exp 1.4
M +1 -0 fork.vgtest 1.3
--- valgrind/none/tests/fork.c #1.3:1.4
@@ -2,4 +2,5 @@
#include <unistd.h>
#include <sys/types.h>
+#include <sys/wait.h>
#include <stdio.h>
@@ -17,4 +18,7 @@ int main(void)
printf("%s", pid==0 ? "X" : "XX");
+ if (pid != 0)
+ waitpid(pid, NULL, 0);
+
return 0;
}
--- valgrind/none/tests/fork.stderr.exp #1.3:1.4
@@ -1,2 +0,0 @@
-
-
--- valgrind/none/tests/fork.vgtest #1.2:1.3
@@ -1 +1,2 @@
prog: fork
+vgopts: -q
|