1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

runProgram: support gid, uid, chdir

This commit is contained in:
Graham Christensen 2019-05-11 16:35:53 -04:00
parent dde8eeb39a
commit b4a05edbfe
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
3 changed files with 30 additions and 22 deletions

View file

@ -265,10 +265,11 @@ string runProgram(Path program, bool searchPath = false,
const Strings & args = Strings(),
const std::optional<std::string> & input = {});
pid_t doFork(bool allowVfork, std::function<void()> fun);
struct RunOptions
{
std::optional<uid_t> uid;
std::optional<uid_t> gid;
std::optional<Path> chdir;
Path program;
bool searchPath = true;
Strings args;