child run; this was random so the test was failing spuriously sometimes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1123
pid = fork ();
- printf("my pid is %s\n", pid==0 ? "zero" : "non-zero");
+ /* Sometimes child goes first (non-zero), sometimes parent (zero). This
+ printing means we can detect if we correctly get a zero result and a
+ non-zero result (--> three 'X's printed), but the output doesn't depend
+ on the order. */
+
+ printf("%s", pid==0 ? "X" : "XX");
return 0;
}
-my pid is non-zero
-my pid is zero
+XXX
\ No newline at end of file