#include "ForkAndExec.hpp"
+#include "p9y/poll.hpp"
#include <cstdio>
-
#include <fcntl.h>
-#include <sys/poll.h>
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <spawn.h>
#if !HAVE_PIPE2
static inline int setfl(int fd, int newflags) {
}
void ForkAndExec::pollExecReadyPipe() {
-#if __APPLE__ || __FreeBSD__
+#if __APPLE__
char c, n = 50;
do {
if (0 == read(ready[mode::READ], &c, 1)) {