Skip to content

Commit 355093d

Browse files
committed
Isolate child processes from signals meant for the watchdog
1 parent 1e515d2 commit 355093d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/process.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ void process_start(int app_index)
8484
else if(pid == 0)
8585
{
8686
// Child process
87+
// Create new session to detach from parent's terminal/process group
88+
// The child processes should be started in their own process group so they don't receive signals meant for the watchdog
89+
setsid();
8790
// Close inherited file descriptors (except stdin/stdout/stderr)
8891
int max_fd = (int)sysconf(_SC_OPEN_MAX);
8992

0 commit comments

Comments
 (0)