summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--command.c1
-rw-r--r--ui.c1
-rw-r--r--url.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index 4c290fc..b345e11 100644
--- a/command.c
+++ b/command.c
@@ -472,6 +472,7 @@ static void commandExec(uint id, char *params) {
 	if (pid < 0) err(EX_OSERR, "fork");
 	if (pid) return;
 
+	setsid();
 	close(STDIN_FILENO);
 	dup2(execPipe[1], STDOUT_FILENO);
 	dup2(utilPipe[1], STDERR_FILENO);
diff --git a/ui.c b/ui.c
index 1b21cc5..8f8de1e 100644
--- a/ui.c
+++ b/ui.c
@@ -567,6 +567,7 @@ static void notify(uint id, const char *str) {
 	if (pid < 0) err(EX_OSERR, "fork");
 	if (pid) return;
 
+	setsid();
 	close(STDIN_FILENO);
 	dup2(utilPipe[1], STDOUT_FILENO);
 	dup2(utilPipe[1], STDERR_FILENO);
diff --git a/url.c b/url.c
index 9de2f9a..219a83c 100644
--- a/url.c
+++ b/url.c
@@ -123,6 +123,7 @@ static void urlOpen(const char *url) {
 	if (pid < 0) err(EX_OSERR, "fork");
 	if (pid) return;
 
+	setsid();
 	close(STDIN_FILENO);
 	dup2(utilPipe[1], STDOUT_FILENO);
 	dup2(utilPipe[1], STDERR_FILENO);
@@ -174,6 +175,7 @@ static void urlCopy(const char *url) {
 		return;
 	}
 
+	setsid();
 	dup2(rw[0], STDIN_FILENO);
 	dup2(utilPipe[1], STDOUT_FILENO);
 	dup2(utilPipe[1], STDERR_FILENO);