aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/libstore/build.cc4
-rw-r--r--src/libstore/local-store.cc2
-rw-r--r--src/libutil/util.cc9
-rw-r--r--src/libutil/util.hh3
5 files changed, 4 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 55e6191cf..00c1d495d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,10 +89,6 @@ AC_CHECK_HEADERS([sys/mount.h], [], [],
])
-# Check for vfork.
-#AC_FUNC_FORK()
-
-
# Check for lutimes, optionally used for changing the mtime of
# symlinks.
AC_CHECK_FUNCS([lutimes])
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index f38cd2994..70a3effb2 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -602,7 +602,7 @@ HookInstance::HookInstance()
builderOut.create();
/* Fork the hook. */
- pid = maybeVfork();
+ pid = fork();
switch (pid) {
case -1:
@@ -2781,7 +2781,7 @@ void SubstitutionGoal::tryToRun()
const char * * argArr = strings2CharPtrs(args);
/* Fork the substitute program. */
- pid = maybeVfork();
+ pid = fork();
switch (pid) {
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 5d210ae01..08ab269b3 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1083,7 +1083,7 @@ void LocalStore::startSubstituter(const Path & substituter, RunningSubstituter &
setSubstituterEnv();
- run.pid = maybeVfork();
+ run.pid = fork();
switch (run.pid) {
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 8fc78b146..5f6203bc2 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -868,7 +868,7 @@ string runProgram(Path program, bool searchPath, const Strings & args)
/* Fork. */
Pid pid;
- pid = maybeVfork();
+ pid = fork();
switch (pid) {
@@ -928,13 +928,6 @@ void closeOnExec(int fd)
}
-#if HAVE_VFORK
-pid_t (*maybeVfork)() = vfork;
-#else
-pid_t (*maybeVfork)() = fork;
-#endif
-
-
//////////////////////////////////////////////////////////////////////
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 1e9ffcf51..07c027a1f 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -266,9 +266,6 @@ void closeMostFDs(const set<int> & exceptions);
/* Set the close-on-exec flag for the given file descriptor. */
void closeOnExec(int fd);
-/* Call vfork() if available, otherwise fork(). */
-extern pid_t (*maybeVfork)();
-
/* User interruption. */