diff --git a/lix/libutil/processes.cc b/lix/libutil/processes.cc index 5fefa9103..ae68a156a 100644 --- a/lix/libutil/processes.cc +++ b/lix/libutil/processes.cc @@ -350,9 +350,6 @@ RunningProgram runProgram2(const RunOptions & options) /* Fork. */ Pid pid{startProcess( [&]() { - if (options.createSession && setsid() == -1) { - throw SysError("setsid"); - } if (options.environment) { replaceEnv(*options.environment); } @@ -371,10 +368,6 @@ RunningProgram runProgram2(const RunOptions & options) } } - if (options.chdir && sys::chdir(*options.chdir) == -1) { - throw SysError("chdir failed"); - } - #if __linux__ if (!options.caps.empty() && prctl(PR_SET_KEEPCAPS, 1) < 0) { throw SysError("setting keep-caps failed"); diff --git a/lix/libutil/processes.hh b/lix/libutil/processes.hh index bb4eefaef..ff4a794a0 100644 --- a/lix/libutil/processes.hh +++ b/lix/libutil/processes.hh @@ -109,10 +109,8 @@ struct RunOptions Strings args = {}; std::optional uid = {}; std::optional gid = {}; - std::optional chdir = {}; std::optional> environment = {}; bool captureStdout = false; - bool createSession = false; std::vector redirections; #if __linux__ std::set caps;