aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-04-01 20:18:52 +0200
committerErlang/OTP <[email protected]>2016-04-01 20:18:52 +0200
commit6db3f232f2ca8a77537a241cdd3e0f289610e064 (patch)
treea629cfbc6f3abbcdbd9f12040b52bfdb3ec58a85 /erts
parent0634218b601614802563927c8f9b6f51a463b746 (diff)
parent455cbcf2230715b37da14573cb9ba60a68c24a26 (diff)
downloadotp-6db3f232f2ca8a77537a241cdd3e0f289610e064.tar.gz
otp-6db3f232f2ca8a77537a241cdd3e0f289610e064.tar.bz2
otp-6db3f232f2ca8a77537a241cdd3e0f289610e064.zip
Merge branch 'rickard/port-sig-dropped-fix/OTP-13424' into maint-18
* 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.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 81a05a6b87..fbcb0c31fc 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -1529,8 +1529,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;