[erlang-questions] clarify: gen_server:start_link/3 return values?

Fernando Benavides <>
Thu Apr 25 19:04:27 CEST 2013


Marcelo (from Inaka) wrote a blog post about this particular subject not
too long ago: http://inaka.net/blog/2012/11/29/every-day-erlang/



*Fernando Benavides <http://google.com/profiles/greenmellon>*



On Thu, Apr 25, 2013 at 10:12 AM, Aggelos Giantsios <>wrote:

>
> On Thu, Apr 25, 2013 at 3:45 PM, Bengt Kleberg <
> > wrote:
>
>> Would it not be consistent with the documentation if the return values
>> {stop, Reason} or ignore, from init/1, would not cause a call to
>> erlang:exit/1 ?
>>
>>
>> bengt
>>
>
> The call to erlang:exit/1 is necessary as the spawned process must be
> terminated. The problem is that the link between the parent and the child
> process still exists after proc_lib:init_ack/2 returns.
> I suppose that if you want the behaviour to match the documentation, there
> should be a call to erlang:unlink/1 before raising the exception and
> crashing the spawned process.
> However, I do not know if the present behaviour is by design or a bug.
> Maybe someone from the OTP team can shed some light on this.
>
> Aggelos
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130425/efca2dae/attachment.html>


More information about the erlang-questions mailing list