aboutsummaryrefslogtreecommitdiff
path: root/seatd-launch
diff options
context:
space:
mode:
Diffstat (limited to 'seatd-launch')
-rw-r--r--seatd-launch/seatd-launch.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/seatd-launch/seatd-launch.c b/seatd-launch/seatd-launch.c
index 7b41bb6..69ca86a 100644
--- a/seatd-launch/seatd-launch.c
+++ b/seatd-launch/seatd-launch.c
@@ -71,8 +71,16 @@ int main(int argc, char *argv[]) {
char pipebuf[16] = {0};
snprintf(pipebuf, sizeof pipebuf, "%d", fds[1]);
+ char *env[2] = {NULL, NULL};
+ char loglevelbuf[32] = {0};
+ char *cur_loglevel = getenv("SEATD_LOGLEVEL");
+ if (cur_loglevel != NULL) {
+ snprintf(loglevelbuf, sizeof loglevelbuf, "SEATD_LOGLEVEL=%s", cur_loglevel);
+ env[0] = loglevelbuf;
+ }
+
char *command[] = {"seatd", "-n", pipebuf, "-s", sockpath, NULL};
- execv(SEATD_INSTALLPATH, command);
+ execve(SEATD_INSTALLPATH, command, env);
perror("Could not start seatd");
_exit(1);
}