diff options
author | Lukas Larsson <[email protected]> | 2018-04-12 14:00:58 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-04-12 14:00:58 +0200 |
commit | 7d6a44f848565bba425303faea5cb4e30f286a42 (patch) | |
tree | a5c176c252f5166559eb2ae6435b815d55aabb64 /erts/emulator/sys | |
parent | 0f4e092e58929a9a517eb17653f4ec217f2a9132 (diff) | |
parent | bc53f111f172dd98f82a10706f146cb824ebb9f6 (diff) | |
download | otp-7d6a44f848565bba425303faea5cb4e30f286a42.tar.gz otp-7d6a44f848565bba425303faea5cb4e30f286a42.tar.bz2 otp-7d6a44f848565bba425303faea5cb4e30f286a42.zip |
Merge branch 'lukas/erts/fix_openbsd_eof_poll/OTP-14346'
* lukas/erts/fix_openbsd_eof_poll/OTP-14346:
erts: Break etp-processes/ports when all found
erts: Don't use EV_DISPATCH on openbsd
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r-- | erts/emulator/sys/common/erl_poll.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c index 7aa53e8f36..ced8a4a2a7 100644 --- a/erts/emulator/sys/common/erl_poll.c +++ b/erts/emulator/sys/common/erl_poll.c @@ -782,10 +782,14 @@ update_pollset(ErtsPollSet *ps, int fd, ErtsPollOp op, ErtsPollEvents events) struct kevent evts[2]; struct timespec ts = {0, 0}; -#ifdef EV_DISPATCH - /* If we have EV_DISPATCH we use it. The kevent descriptions for both - read and write are added on OP_ADD and removed on OP_DEL. And then - after than only EV_ENABLE|EV_DISPATCH are used. +#if defined(EV_DISPATCH) && !defined(__OpenBSD__) + /* If we have EV_DISPATCH we use it, unless we are on OpenBSD as the + behavior of EV_EOF seems to be edge triggered there and we need it + to be level triggered. + + The kevent descriptions for both read and write are added on OP_ADD + and removed on OP_DEL. And then after than only EV_ENABLE|EV_DISPATCH + are used. It could be possible to not modify the pollset when disabling and/or deleting events, but that may cause the poll threads to be awoken |