Remove maybeVfork
This commit is contained in:
parent
04170d06bf
commit
7911e4c27a
|
@ -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
|
# Check for lutimes, optionally used for changing the mtime of
|
||||||
# symlinks.
|
# symlinks.
|
||||||
AC_CHECK_FUNCS([lutimes])
|
AC_CHECK_FUNCS([lutimes])
|
||||||
|
|
|
@ -602,7 +602,7 @@ HookInstance::HookInstance()
|
||||||
builderOut.create();
|
builderOut.create();
|
||||||
|
|
||||||
/* Fork the hook. */
|
/* Fork the hook. */
|
||||||
pid = maybeVfork();
|
pid = fork();
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
|
|
||||||
case -1:
|
case -1:
|
||||||
|
@ -2781,7 +2781,7 @@ void SubstitutionGoal::tryToRun()
|
||||||
const char * * argArr = strings2CharPtrs(args);
|
const char * * argArr = strings2CharPtrs(args);
|
||||||
|
|
||||||
/* Fork the substitute program. */
|
/* Fork the substitute program. */
|
||||||
pid = maybeVfork();
|
pid = fork();
|
||||||
|
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
|
|
||||||
|
|
|
@ -1083,7 +1083,7 @@ void LocalStore::startSubstituter(const Path & substituter, RunningSubstituter &
|
||||||
|
|
||||||
setSubstituterEnv();
|
setSubstituterEnv();
|
||||||
|
|
||||||
run.pid = maybeVfork();
|
run.pid = fork();
|
||||||
|
|
||||||
switch (run.pid) {
|
switch (run.pid) {
|
||||||
|
|
||||||
|
|
|
@ -868,7 +868,7 @@ string runProgram(Path program, bool searchPath, const Strings & args)
|
||||||
|
|
||||||
/* Fork. */
|
/* Fork. */
|
||||||
Pid pid;
|
Pid pid;
|
||||||
pid = maybeVfork();
|
pid = fork();
|
||||||
|
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
|
|
||||||
|
@ -928,13 +928,6 @@ void closeOnExec(int fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_VFORK
|
|
||||||
pid_t (*maybeVfork)() = vfork;
|
|
||||||
#else
|
|
||||||
pid_t (*maybeVfork)() = fork;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -266,9 +266,6 @@ void closeMostFDs(const set<int> & exceptions);
|
||||||
/* Set the close-on-exec flag for the given file descriptor. */
|
/* Set the close-on-exec flag for the given file descriptor. */
|
||||||
void closeOnExec(int fd);
|
void closeOnExec(int fd);
|
||||||
|
|
||||||
/* Call vfork() if available, otherwise fork(). */
|
|
||||||
extern pid_t (*maybeVfork)();
|
|
||||||
|
|
||||||
|
|
||||||
/* User interruption. */
|
/* User interruption. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue