test: Use fork() on MacOS X

MacOS X 10.7 (and maybe some previous versions, too) can fork()
processes which use CoreGraphics. This makes it possible for
cairo-test-suite to withstand a test crash without killing the whole
suite.

The old behavior is still available using the '-f' (foreground)
option.
This commit is contained in:
Andrea Canciani 2011-12-15 13:04:02 -08:00
parent bbe692372d
commit 5ce6e02793

View file

@ -35,10 +35,7 @@
#include <pixman.h> /* for version information */
/* Coregraphics doesn't seem to like being forked and reports:
* "The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec()."
* so we don't for on OS X */
#define SHOULD_FORK HAVE_FORK && HAVE_WAITPID && !__APPLE__
#define SHOULD_FORK HAVE_FORK && HAVE_WAITPID
#if SHOULD_FORK
#if HAVE_UNISTD_H
#include <unistd.h>