Supervisor shutdown
Ulf Wiger
ulf.wiger@REDACTED
Tue Nov 25 13:31:33 CET 2003
On Tue, 25 Nov 2003 13:03:11 +0100, Vlad Dumitrescu
<vlad_dumitrescu@REDACTED> wrote:
> From: "Gunilla Arendt" <gunilla@REDACTED>
>> No, the supervisor *is* required to call start_link!
>
> I don't mean to argue with the OTP team :-) but the supervisor docs say,
> when describing children specifications:
Yes, but there is a small quirk in the gen_server.erl module that
causes it not to heed the shutdown protocol if started with
gen_server:start(), even if you _do_ create the link in some other
way. From the supervisor side, everything is fine, but the gen_server
doesn't recognise the supervisor as its parent.
So, when the child is a gen_server, the start function must be
{gen_server, start_link, [...]} in order for everything to
work correctly.
The same goes for gen_fsm and gen_event.
/Uffe
--
Ulf Wiger, Senior System Architect
EAB/UPD/S
More information about the erlang-questions
mailing list