aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-15 20:51:29 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-05-15 20:51:29 +0200
commit0f5032c5a4b41bceefac9f834baf288466fc20ae (patch)
tree81335b1714bca37821314e02b93ca357422dc049 /src/libutil/util.hh
parent38b87dea62fa1295c3a8c019477dd8661542a0e0 (diff)
parent8f6c72faeec2dfd3ce6e48c9539bb5d7a161f37a (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 09a90a340..35f9169f6 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -271,6 +271,9 @@ string runProgram(Path program, bool searchPath = false,
struct RunOptions
{
+ std::optional<uid_t> uid;
+ std::optional<uid_t> gid;
+ std::optional<Path> chdir;
Path program;
bool searchPath = true;
Strings args;
@@ -427,6 +430,7 @@ void ignoreException();
/* Some ANSI escape sequences. */
#define ANSI_NORMAL "\e[0m"
#define ANSI_BOLD "\e[1m"
+#define ANSI_FAINT "\e[2m"
#define ANSI_RED "\e[31;1m"
#define ANSI_GREEN "\e[32;1m"
#define ANSI_BLUE "\e[34;1m"