Skip to content

Commit 5a0f683

Browse files
author
Samuel Groß
committed
Reset any blocked signals after forking in libreprl
1 parent 993ce3e commit 5a0f683

File tree

2 files changed

+501
-0
lines changed

2 files changed

+501
-0
lines changed

Sources/libreprl/libreprl.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ static int reprl_spawn_child(struct reprl_context* ctx)
206206
_exit(-1);
207207
}
208208

209+
// Unblock any blocked signals. It seems that libdispatch sometimes blocks delivery of certain signals.
210+
sigset_t newset;
211+
sigemptyset(&newset);
212+
if (sigprocmask(SIG_SETMASK, &newset, NULL) != 0) {
213+
fprintf(stderr, "sigprocmask failed in the child: %s\n", strerror(errno));
214+
_exit(-1);
215+
}
216+
209217
close(cwpipe[0]);
210218
close(crpipe[1]);
211219

0 commit comments

Comments
 (0)