beepboop

beepboop

DynamicSupervisor - why does it ignore exit signals from non-child processes?

DynamicSupervisor traps exit signals and handles ones coming from its children:

https://github.com/elixir-lang/elixir/blob/427d21e410d1846c232d0a0b0e87cce629884dfa/lib/elixir/lib/dynamic_supervisor.ex#L795-L801

However, it also implicitly ignores exit signals from non-child processes: elixir/lib/elixir/lib/dynamic_supervisor.ex at 427d21e410d1846c232d0a0b0e87cce629884dfa · elixir-lang/elixir · GitHub

Does anyone know - is it an intentional design decision?

I’m trying to link it to a process that’s not its direct parent/child, so it would exit when the other process exits, but of course at the moment it doesn’t work. I don’t care so much about my use-case per-se (I can figure out a solution), but I’m in general wondering if there’s a good reason for how DynamicSupervisor is implemented - i.e. maybe I’m doing something that goes against first principles?

Most Liked

hauleth

hauleth

Make that proces being supervised by that supervisor instead, and then make it :significant (though I do not know if DynamicSupervisor supports that, but if that process is known to be there, then why it is part of DynamicSupervisor?).

Where Next?

Popular in Questions Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement