chiark / gitweb /
automount: implement automount unit type
[elogind.git] / execute.c
index dfedb31a5312f652ac6da60584a4185fa9bb3bd5..357fd5c20874aea7a6c670b89f7e737f64aa3fb1 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -788,10 +788,11 @@ int exec_spawn(ExecCommand *command,
                         goto fail;
                 }
 
-                if (setsid() < 0) {
-                        r = EXIT_SETSID;
-                        goto fail;
-                }
+                if (!context->no_setsid)
+                        if (setsid() < 0) {
+                                r = EXIT_SETSID;
+                                goto fail;
+                        }
 
                 umask(context->umask);