From be46e8a8bd3c79c052427eb4c4622f3b8bc08207 Mon Sep 17 00:00:00 2001 From: Utkarsh Verma Date: Sun, 10 Jul 2022 14:15:32 +0530 Subject: [PATCH] Set session ID for fork. Fixes #28 --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 43f0452..d3e707d 100644 --- a/main.c +++ b/main.c @@ -81,8 +81,9 @@ void execBlock(int i, const char* button) { if (button) setenv("BLOCK_BUTTON", button, 1); + setsid(); execl("/bin/sh", "sh", "-c", blocks[i].command, (char*)NULL); - _exit(1); + exit(EXIT_SUCCESS); } }