[erlang-questions] Avoiding crash dump when returning {stop, Reason} from a gen_server?
Siri Hansen
erlangsiri@REDACTED
Thu Sep 18 10:08:56 CEST 2014
2014-09-16 13:45 GMT+02:00 Roger Lipscombe <roger@REDACTED>:
>
> So, basically, it appears that -- assuming that the rest of my plan is
> sound -- I should return {stop, {shutdown, Term}, NewState}, and
> handle the {shutdown, Term} differently in my monitoring process.
>
Yes, that is probably what you are looking for - {shutdown,Reason} was
introduced for reasons similar to this. It is handled exactly like shutdown
from supervisor's, gen_*'s and proc_lib's point of view. You can read about
it in the reference manual for these modules also.
Regards
/siri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140918/ad79301c/attachment.htm>
More information about the erlang-questions
mailing list