]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/main.c: use spawn_async_no_shell()
authorJohan Malm <jgm323@gmail.com>
Fri, 19 Jun 2020 21:29:54 +0000 (22:29 +0100)
committerJohan Malm <jgm323@gmail.com>
Fri, 19 Jun 2020 21:29:54 +0000 (22:29 +0100)
src/main.c

index 3ae32391b4b407eb101063754dcde9569ca1a7ed..9f64419bdda3f08ff463a70cf881995c656c02c7 100644 (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;