Set session ID for fork. Fixes #28

This commit is contained in:
Utkarsh Verma
2022-07-10 14:15:32 +05:30
parent cdc992cc41
commit be46e8a8bd

3
main.c
View File

@@ -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);
}
}