diff options
author | Erlang/OTP <otp@erlang.org> | 2023-05-04 17:25:04 +0200 |
---|---|---|
committer | Erlang/OTP <otp@erlang.org> | 2023-05-04 17:25:04 +0200 |
commit | a0dcab09b4b017fcf810cc83693267d83ec03690 (patch) | |
tree | 7cd1ac9882dc5391013ae4e69b2c29748252defd | |
parent | d754f32cceeecf416878e7d61ee38d921bbbb259 (diff) | |
parent | 2b2034cd070afccfaccf4ff8b3a9050eb090290e (diff) | |
download | erlang-a0dcab09b4b017fcf810cc83693267d83ec03690.tar.gz |
Merge branch 'sverker/cpu_sup-port-close-error/OTP-18559' into maint-25
* sverker/cpu_sup-port-close-error/OTP-18559:
os_mon: Fix failing port_close
-rw-r--r-- | lib/os_mon/src/cpu_sup.erl | 4 | ||||
-rw-r--r-- | lib/os_mon/src/memsup.erl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/os_mon/src/cpu_sup.erl b/lib/os_mon/src/cpu_sup.erl index be917021e7..adf1f45265 100644 --- a/lib/os_mon/src/cpu_sup.erl +++ b/lib/os_mon/src/cpu_sup.erl @@ -613,8 +613,8 @@ port_server_loop(Port, Timeout) -> % Close port and this server {Pid, ?quit} -> - port_command(Port, ?quit), - port_close(Port), + Port ! {self(), {command, ?quit}}, + Port ! {self(), close}, Pid ! {self(), {data, quit}}, ok; diff --git a/lib/os_mon/src/memsup.erl b/lib/os_mon/src/memsup.erl index 1c93bfbae4..c467adc2e5 100644 --- a/lib/os_mon/src/memsup.erl +++ b/lib/os_mon/src/memsup.erl @@ -653,7 +653,7 @@ start_portprogram() -> port_shutdown(Port) -> Port ! {self(), {command, [?EXIT]}}, - port_close(Port). + Port ! {self(), close}. %% The connected process loops are a bit awkward (several different %% functions doing almost the same thing) as |