summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@webkeks.org>2015-08-09 16:59:56 +0200
committerJonathan Schleifer <js@webkeks.org>2015-08-09 16:59:56 +0200
commitcd472b0cd35e6310d78125677b54f5e5a6b56630 (patch)
tree67918e2d640ac1cdb01d0f74c9bc8c17564c4a0b
parente636aae93ec09b425233e09940888f6162400a9c (diff)
OFProcess: Use vfork() instead of fork()
-rw-r--r--configure.ac4
-rw-r--r--src/OFProcess.m2
2 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 639cc6c4..33ddd523 100644
--- a/configure.ac
+++ b/configure.ac
@@ -936,8 +936,8 @@ case "$host" in
have_processes="no"
;;
*)
- AC_CHECK_FUNCS([fork dup2 execvp kill _exit], [
- AS_IF([test x"$ac_cv_func_fork" = x"yes" \
+ AC_CHECK_FUNCS([vfork dup2 execvp kill _exit], [
+ AS_IF([test x"$ac_cv_func_vfork" = x"yes" \
-a x"$ac_cv_func_pipe" = x"yes" \
-a x"$ac_cv_func_dup2" = x"yes" \
-a x"$ac_cv_func_execvp" = x"yes" \
diff --git a/src/OFProcess.m b/src/OFProcess.m
index 4a021012..2fbf36c4 100644
--- a/src/OFProcess.m
+++ b/src/OFProcess.m
@@ -199,7 +199,7 @@ extern char **environ;
posix_spawnattr_destroy(&attr);
}
# else
- if ((_pid = fork()) == 0) {
+ if ((_pid = vfork()) == 0) {
environ = env;
close(_readPipe[0]);