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 "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;