fdm: always check for signals after epoll_pwait(), not only on EINTR #535

Manually merged
dnkl merged 1 commits from fdm-always-check-for-signals into master 6 months ago
dnkl commented 6 months ago
Owner

This fixes an issue where we, at least on FreeBSD, sometimes get stuck in epoll_pwait() after the shell has exited.

It turned out to be because the SIGCHLD signal was delivered at the same time FDs were made readable/writeable. I.e. epoll_pwait() returned a non-zero value even though it should have been interrupted by the SIGCHLD.

To avoid having to search the entire signal array every time epoll_pwait() returns, add a flag that is set in the signal handler. This tells the FDM to scan the signal array after returning from epoll_pwait().

Closes #534

This fixes an issue where we, at least on FreeBSD, sometimes get stuck in `epoll_pwait()` after the shell has exited. It turned out to be because the `SIGCHLD` signal was delivered at the same time FDs were made readable/writeable. I.e. `epoll_pwait()` returned a non-zero value even though it should have been interrupted by the `SIGCHLD`. To avoid having to search the entire signal array *every time* `epoll_pwait()` returns, add a flag that is set in the signal handler. This tells the FDM to scan the signal array after returning from `epoll_pwait()`. Closes #534
dnkl added the
bug
label 6 months ago
dnkl added 1 commit 6 months ago
890dbc49cf
fdm: always check for signals after epoll_pwait(), not only on EINTR

Tested.

Tested.
dnkl merged commit af428d544f into master manually 6 months ago
The pull request has been manually merged as af428d544f.
Sign in to join this conversation.
Loading…
There is no content yet.