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:
parent
dde8eeb39a
commit
b4a05edbfe
3 changed files with 30 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue