Terminating Supervisor with simple_one_for_one workers

I dynamically start workers with a simple_one_for_one supervisor that don’t terminate on their own. If the application exits it terminates the supervisor and all it’s workers. That’s fine so far.

But I get error messages

[error] Supervisor clientworker_sup had child client started with client_srv:start_link() at <0.856.0> exit with reason killed in context child_terminated

It has no bad effects beyond the user’s confusion. But I would really like a nice behaviour.

How can a simple_one_for_one supervisor be terminated with all it’s workers without any error message?

Maybe that:

If the child process is another supervisor, the shutdown time must be set to
infinity to give the subtree ample time to shut down.

?

Good idea. And I have seen this cause somewhere else. But here for sure these are workers or to be more precise gen_servers.