src/main.c: use spawn_async_no_shell()

This commit is contained in:
Johan Malm 2020-06-19 22:29:54 +01:00
parent 75594d81b7
commit 786ee4d455

View file

@ -1,5 +1,6 @@
#include "labwc.h" #include "labwc.h"
#include "theme.h" #include "theme.h"
#include "spawn.h"
struct server server = { 0 }; struct server server = { 0 };
struct rcxml rc = { 0 }; struct rcxml rc = { 0 };
@ -40,12 +41,8 @@ int main(int argc, char *argv[])
server_init(&server); server_init(&server);
server_start(&server); server_start(&server);
if (startup_cmd) { if (startup_cmd)
if (fork() == 0) { spawn_async_no_shell(startup_cmd);
execl("/bin/sh", "/bin/sh", "-c", startup_cmd,
(void *)NULL);
}
}
wl_display_run(server.wl_display); wl_display_run(server.wl_display);
server_finish(&server); server_finish(&server);
return 0; return 0;