summaryrefslogtreecommitdiff
path: root/execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'execute.c')
-rw-r--r--execute.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/execute.c b/execute.c
index dfedb31a53..357fd5c208 100644
--- 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);