File 1962-shell-Fix-jcl-kill-to-not-cause-crash-report.patch of Package erlang
From 85336741cf8470d54c60af66511955c32f7640d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= <lukas@erlang.org>
Date: Mon, 9 Sep 2024 15:56:10 +0200
Subject: [PATCH 2/2] shell: Fix jcl kill to not cause crash report
When group gets any exit message from its driver, it
is in order to do a 'nice' shutdown, so we exit with
normal reason in order to not print any error report.
---
lib/kernel/src/group.erl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/kernel/src/group.erl b/lib/kernel/src/group.erl
index d886c001fc..ef0bf41209 100644
--- a/lib/kernel/src/group.erl
+++ b/lib/kernel/src/group.erl
@@ -465,10 +465,10 @@ handle_info(_State, {'EXIT', Drv, interrupt}, #state{ driver = Drv } = Data) ->
io_reply(Data, {error, interrupted}),
pop_state(Data#state{ buf = [] });
-handle_info(_State, {'EXIT',Drv,R}, #state{ driver = Drv } = Data) ->
+handle_info(_State, {'EXIT',Drv,_R}, #state{ driver = Drv } = Data) ->
[ exit(Data#state.shell, kill)
|| is_pid(Data#state.shell) andalso Data#state.input =/= undefined],
- {stop, R};
+ {stop, normal};
handle_info(_State, {'EXIT',Shell,R}, #state{ shell = Shell, driver = Drv }) ->
%% We propagate the error reason from the shell to the driver, but we don't
%% want to exit ourselves with that reason as it will generate crash report
--
2.43.0