aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2015-07-06 21:14:23 +0200
committerErlang/OTP <[email protected]>2015-07-06 21:14:23 +0200
commit41bfee8dbc7127417c8d28e5189f33179908ea46 (patch)
tree63f715052609f4fc6390dc244b2bcc66eac80a0d /erts/emulator/beam/erl_process.c
parent99d3e9c5b2569169d2f5fefd67898d2533e5a83d (diff)
parente98fb1920ad053d2db4594c5d33cdfcfcdc6d771 (diff)
downloadotp-41bfee8dbc7127417c8d28e5189f33179908ea46.tar.gz
otp-41bfee8dbc7127417c8d28e5189f33179908ea46.tar.bz2
otp-41bfee8dbc7127417c8d28e5189f33179908ea46.zip
Merge branch 'rickard/non-smp-trace-port-exit-bug/OTP-12889' into maint-17
* rickard/non-smp-trace-port-exit-bug/OTP-12889: Teach non-smp VM how to deal with trace port crash Test case testing crash in tracer port
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,