summaryrefslogtreecommitdiffstats
path: root/src/bfstd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bfstd.c')
-rw-r--r--src/bfstd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bfstd.c b/src/bfstd.c
index eee02b8..06226a2 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/wait.h>
#include <unistd.h>
#include <wchar.h>
#include <wctype.h>
@@ -391,6 +392,14 @@ int xminor(dev_t dev) {
#endif
}
+pid_t xwaitpid(pid_t pid, int *status, int flags) {
+ pid_t ret;
+ do {
+ ret = waitpid(pid, status, flags);
+ } while (ret < 0 && errno == EINTR);
+ return ret;
+}
+
int dup_cloexec(int fd) {
#ifdef F_DUPFD_CLOEXEC
return fcntl(fd, F_DUPFD_CLOEXEC, 0);