erlang/otp — pull request #287 by fishcakez (2014-03-09 15:53:22+00:00)
Title: Stop supervisor adding temporary children on code change

If a `temporary` child has stopped (and so been removed from a supervisor's childspecs) a code upgrade would re-add it to the childspecs. If the supervisor was `one_for_all` or `rest_for_one` the `temporary` child would be restarted if another child triggered a restart. The `temporary` child would also appear in the `supervisor:which_children/1` results with an `undefined` pid, which is unexpected given the behaviour of `temporary` children.

This patch prevents new `temporary` children being added to a supervisor's childspecs in a code upgrade, copying the behaviour added in 4f9b938112a80f1c1e210b1a6af40a42f833cfa2.