Skip to content

Commit a0dcab0

Browse files
author
Erlang/OTP
committed
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
2 parents d754f32 + 2b2034c commit a0dcab0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/os_mon/src/cpu_sup.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ port_server_loop(Port, Timeout) ->
613613

614614
% Close port and this server
615615
{Pid, ?quit} ->
616-
port_command(Port, ?quit),
617-
port_close(Port),
616+
Port ! {self(), {command, ?quit}},
617+
Port ! {self(), close},
618618
Pid ! {self(), {data, quit}},
619619
ok;
620620

lib/os_mon/src/memsup.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ start_portprogram() ->
653653

654654
port_shutdown(Port) ->
655655
Port ! {self(), {command, [?EXIT]}},
656-
port_close(Port).
656+
Port ! {self(), close}.
657657

658658
%% The connected process loops are a bit awkward (several different
659659
%% functions doing almost the same thing) as

0 commit comments

Comments
 (0)