Skip to content

Commit 308fe04

Browse files
authored
Add note
1 parent 4685d05 commit 308fe04

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/posix/proc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@ wait_thread_loop(UNUSED void *arg)
288288
pthread_cond_signal(&proc_wait_thread_cond);
289289
pthread_mutex_unlock(&proc_wait_thread_mtx);
290290
do {
291+
/*
292+
* Check for errors before altering the cancellation
293+
* state, so we don't end up calling sigwaitinfo
294+
* with the cancellations disabled.
295+
*/
291296
if (ret < 0) {
292297
dbg_printf("sigwaitinfo(2): %s", strerror(errno));
293298
continue;

0 commit comments

Comments
 (0)