failtest: override getpid() as well.
[ccan] / ccan / failtest / failtest_override.h
index cfc180022643e18ae5ed50f537db550ba79caebc..dfcc62e0dd5f4ff5630cc727230a1361ce09ca0c 100644 (file)
 #undef fcntl
 #define fcntl(fd, ...) failtest_fcntl((fd), __FILE__, __LINE__, __VA_ARGS__)
 
+/* Replacement of getpid (since failtest will fork). */
+#undef getpid
+#define getpid() failtest_getpid(__FILE__, __LINE__)
+
 #include <ccan/failtest/failtest_proto.h>
 
 #endif /* CCAN_FAILTEST_OVERRIDE_H */