diff options
author | Erlang/OTP <[email protected]> | 2018-10-11 21:08:32 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2018-10-11 21:08:32 +0200 |
commit | 6d7ad035a89df6eba4a62f1ee16a75202e2db1ba (patch) | |
tree | 677c48a488b071b05ab8aca767c3bfa1eeda53ea /erts | |
parent | 6d4001de141a00b3bf37b8f7b24c5bde2b4f4015 (diff) | |
parent | 455cbcf2230715b37da14573cb9ba60a68c24a26 (diff) | |
download | otp-6d7ad035a89df6eba4a62f1ee16a75202e2db1ba.tar.gz otp-6d7ad035a89df6eba4a62f1ee16a75202e2db1ba.tar.bz2 otp-6d7ad035a89df6eba4a62f1ee16a75202e2db1ba.zip |
Merge branch 'rickard/port-sig-dropped-fix/OTP-13424' into maint-17
* rickard/port-sig-dropped-fix/OTP-13424:
Fix implementation of dropped signal to port
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/io.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 7c6696405b..f3bdd95c2f 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -1552,8 +1552,19 @@ erts_schedule_proc2port_signal(Process *c_p, erts_smp_proc_lock(c_p, ERTS_PROC_LOCK_MAIN); if (sched_res != 0) { - if (refp) + if (refp) { + /* + * We need to restore the message queue save + * pointer to the beginning of the message queue + * since the caller now wont wait for a message + * containing the reference created above... + */ + ASSERT(c_p); + erts_smp_proc_lock(c_p, ERTS_PROC_LOCKS_MSG_RECEIVE); + JOIN_MESSAGE(c_p); + erts_smp_proc_unlock(c_p, ERTS_PROC_LOCKS_MSG_RECEIVE); *refp = NIL; + } return ERTS_PORT_OP_DROPPED; } return ERTS_PORT_OP_SCHEDULED; |