aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-07-06 20:25:28 +0200
committerRickard Green <[email protected]>2015-07-06 20:31:40 +0200
commite98fb1920ad053d2db4594c5d33cdfcfcdc6d771 (patch)
tree5c92e9761b27e630690bcd9802a9789fd77f716f /erts/emulator/beam/erl_process.c
parent6ef7131e497afa22d6e87e3c8082ee861a56781b (diff)
downloadotp-e98fb1920ad053d2db4594c5d33cdfcfcdc6d771.tar.gz
otp-e98fb1920ad053d2db4594c5d33cdfcfcdc6d771.tar.bz2
otp-e98fb1920ad053d2db4594c5d33cdfcfcdc6d771.zip
Teach non-smp VM how to deal with trace port crash
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index ea63d20dfa..b6ad8575cf 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -11082,6 +11082,22 @@ set_proc_exiting(Process *p,
cancel_timer(p);
p->i = (BeamInstr *) beam_exit;
+#ifndef ERTS_SMP
+ if (state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)) {
+ /*
+ * I non smp case:
+ *
+ * Currently executing process might be sent an exit
+ * signal if it is traced by a port that it also is
+ * linked to, and the port terminates during the
+ * trace. In this case we want schedule out the
+ * process as quickly as possible in order to detect
+ * the event as fast as possible.
+ */
+ ERTS_VBUMP_ALL_REDS(p);
+ }
+#endif
+
if (enqueue)
add2runq(enqueue > 0 ? p : make_proxy_proc(NULL, p, enq_prio),
state,