Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
6451-supervisor-Add-missing-shutdown-clauses.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 6451-supervisor-Add-missing-shutdown-clauses.patch of Package erlang
From b0713611f2a331891da75597153cc5d093a18efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <lhoguin@vmware.com> Date: Wed, 3 Nov 2021 10:54:18 +0100 Subject: [PATCH] supervisor: Add missing shutdown clauses This prevents annoying shutdown_error logs from being printed in cases both the process and its supervisor started shutting down at the same time. --- lib/stdlib/src/supervisor.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl index eea5b6a513..17e714fcc0 100644 --- a/lib/stdlib/src/supervisor.erl +++ b/lib/stdlib/src/supervisor.erl @@ -926,6 +926,8 @@ shutdown(#child{pid=Pid, shutdown=brutal_kill} = Child) -> case unlink_flush(Pid, Reason0) of killed -> ok; + shutdown when not (?is_permanent(Child)) -> + ok; {shutdown, _} when not (?is_permanent(Child)) -> ok; normal when not (?is_permanent(Child)) -> @@ -1039,6 +1041,10 @@ wait_dynamic_children(#child{shutdown=brutal_kill} = Child, Pids, Sz, wait_dynamic_children(Child, maps:remove({Pid, Mon}, Pids), Sz-1, TRef, EStack); + shutdown when not (?is_permanent(Child)) -> + wait_dynamic_children(Child, maps:remove({Pid, Mon}, Pids), + Sz-1, TRef, EStack); + {shutdown, _} when not (?is_permanent(Child)) -> wait_dynamic_children(Child, maps:remove({Pid, Mon}, Pids), Sz-1, TRef, EStack); -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor