Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fix monitoring when no parent is provided.
Will squash this down after review.
  • Loading branch information
davisp authored and rnewson committed Jul 30, 2014
1 parent fbe7ae6 commit ddc0db2c520eb0d82afaaa777130da0463cd6229
Showing 1 changed file with 5 additions and 3 deletions.
@@ -48,10 +48,12 @@ start_link(Mod, Func, State, Options) ->

enter_loop(Mod, Func, State, Options) ->
Parent = case proplists:get_value(parent, Options) of
P when is_pid(P) -> P;
_ -> undefined
P when is_pid(P) ->
erlang:monitor(process, P),
P;
_ ->
undefined
end,
erlang:monitor(process, Parent),
St = #st{
mod = Mod,
func = Func,

0 comments on commit ddc0db2

Please sign in to comment.