libutil: remove unused RunOptions::{chdir, createSession}

Change-Id: Ib2b9f5c094233661a01ad8cea30a44e11931c941
This commit is contained in:
eldritch horrors
2026-01-22 16:59:39 +01:00
parent b5a25f0fb6
commit 0453be06b6
2 changed files with 0 additions and 9 deletions
-7
View File
@@ -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");
-2
View File
@@ -109,10 +109,8 @@ struct RunOptions
Strings args = {};
std::optional<uid_t> uid = {};
std::optional<uid_t> gid = {};
std::optional<Path> chdir = {};
std::optional<std::map<std::string, std::string>> environment = {};
bool captureStdout = false;
bool createSession = false;
std::vector<Redirection> redirections;
#if __linux__
std::set<long> caps;