From: Johan Malm Date: Fri, 19 Jun 2020 21:29:54 +0000 (+0100) Subject: src/main.c: use spawn_async_no_shell() X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=786ee4d4557dfcb2c3774d0cbe6f3369d5b1fe19;p=proto%2Flabwc.git src/main.c: use spawn_async_no_shell() --- diff --git a/src/main.c b/src/main.c index 3ae32391..9f64419b 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,6 @@ #include "labwc.h" #include "theme.h" +#include "spawn.h" struct server server = { 0 }; struct rcxml rc = { 0 }; @@ -40,12 +41,8 @@ int main(int argc, char *argv[]) server_init(&server); server_start(&server); - if (startup_cmd) { - if (fork() == 0) { - execl("/bin/sh", "/bin/sh", "-c", startup_cmd, - (void *)NULL); - } - } + if (startup_cmd) + spawn_async_no_shell(startup_cmd); wl_display_run(server.wl_display); server_finish(&server); return 0;