File 4172-os_mon-Fix-failing-port_close.patch of Package erlang

From 2b2034cd070afccfaccf4ff8b3a9050eb090290e Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Fri, 21 Apr 2023 19:27:01 +0200
Subject: [PATCH] os_mon: Fix failing port_close

Use asynchtonous close message to not fail on already closed port.
---
 lib/os_mon/src/cpu_sup.erl | 4 ++--
 lib/os_mon/src/memsup.erl  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

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
-- 
2.35.3

openSUSE Build Service is sponsored by