[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
40/118: Remove maybeVfork
From: |
Ludovic Courtès |
Subject: |
40/118: Remove maybeVfork |
Date: |
Tue, 19 May 2015 14:45:31 +0000 |
civodul pushed a commit to branch nix
in repository guix.
commit 7911e4c27a0020a61ace13cfdc44de4af02f315e
Author: Eelco Dolstra <address@hidden>
Date: Mon Jun 23 09:15:35 2014 -0400
Remove maybeVfork
---
configure.ac | 4 ----
src/libstore/build.cc | 4 ++--
src/libstore/local-store.cc | 2 +-
src/libutil/util.cc | 9 +--------
src/libutil/util.hh | 3 ---
5 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 55e6191..00c1d49 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 f38cd29..70a3eff 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 5d210ae..08ab269 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 8fc78b1..5f6203b 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 1e9ffcf..07c027a 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. */
- 27/118: Add importNative primop, (continued)
- 27/118: Add importNative primop, Ludovic Courtès, 2015/05/19
- 24/118: Drop ImportError and FindError, Ludovic Courtès, 2015/05/19
- 28/118: Only add the importNative primop if the allow-arbitrary-code-during-evaluation option is true (default false), Ludovic Courtès, 2015/05/19
- 30/118: allow-arbitrary-code-during-evaluation -> allow-unsafe-native-code-during-evaluation, Ludovic Courtès, 2015/05/19
- 34/118: Add builtin function ‘fromJSON’, Ludovic Courtès, 2015/05/19
- 36/118: Fix compilation error on some versions of GCC, Ludovic Courtès, 2015/05/19
- 32/118: Style fix, Ludovic Courtès, 2015/05/19
- 46/118: Fix use of sysread, Ludovic Courtès, 2015/05/19
- 33/118: Manual: html -> xhtml, Ludovic Courtès, 2015/05/19
- 45/118: nix-copy-closure -s: Do substitutions via ‘nix-store --serve’, Ludovic Courtès, 2015/05/19
- 40/118: Remove maybeVfork,
Ludovic Courtès <=
- 50/118: Fix closure size display, Ludovic Courtès, 2015/05/19
- 38/118: Fix security hole in ‘nix-store --serve’, Ludovic Courtès, 2015/05/19
- 43/118: Remove tabs, Ludovic Courtès, 2015/05/19
- 35/118: Don't build on Ubuntu 10.10, Ludovic Courtès, 2015/05/19
- 44/118: nix-copy-closure: Fix --dry-run, Ludovic Courtès, 2015/05/19
- 47/118: Replace message "importing path <...>" with "exporting path <...>", Ludovic Courtès, 2015/05/19
- 37/118: Add a test for the SSH substituter, Ludovic Courtès, 2015/05/19
- 39/118: nix-copy-closure: Fix race condition, Ludovic Courtès, 2015/05/19
- 49/118: Allow $NIX_BUILD_HOOK to be relative to Nix libexec directory, Ludovic Courtès, 2015/05/19
- 52/118: Fix test, Ludovic Courtès, 2015/05/19