summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRickard Green <rickard@erlang.org>2021-09-29 14:03:47 +0200
committerRickard Green <rickard@erlang.org>2021-09-29 14:03:47 +0200
commitcf7b6f6cf0bad818da4ba87a80424b4134b0cde4 (patch)
tree9690d3ce58b16b7bac6cd9e7287818c13d761094
parent6d5a5f31c36bbdaad21585d25974177bd1b75e66 (diff)
downloaderlang-cf7b6f6cf0bad818da4ba87a80424b4134b0cde4.tar.gz
Fix handling asynchronous port close
Sending a "Port ! {PortOwner, close}" signal from a process other than the port owner could erroneously trigger a badsig exit signal being sent to the port owner process even though the correct PortOwner had been passed in the signal.
-rw-r--r--erts/emulator/beam/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index d7fa2f2696..5f81449eab 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -2271,7 +2271,7 @@ erts_port_exit(Process *c_p,
switch (try_imm_drv_call(&try_call_state)) {
case ERTS_TRY_IMM_DRV_CALL_OK: {
res = call_deliver_port_exit(flags & ERTS_PORT_SIG_FLG_BANG_OP,
- c_p ? c_p->common.id : from,
+ from,
prt,
try_call_state.state,
reason,