libutil/runProgram2: add explicit argv0 support
Change-Id: I292aed7f25de1c193f6e2374c1f6a7ba9d272dd4
This commit is contained in:
@@ -401,7 +401,7 @@ RunningProgram runProgram2(const RunOptions & options)
|
||||
#endif
|
||||
|
||||
Strings args_(options.args);
|
||||
args_.push_front(options.program);
|
||||
args_.push_front(options.argv0.value_or(options.program));
|
||||
|
||||
restoreProcessContext();
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ struct RunOptions
|
||||
|
||||
Path program;
|
||||
bool searchPath = true;
|
||||
std::optional<std::string> argv0;
|
||||
Strings args = {};
|
||||
std::optional<uid_t> uid = {};
|
||||
std::optional<uid_t> gid = {};
|
||||
|
||||
Reference in New Issue
Block a user