Skip to content

Instantly share code, notes, and snippets.

@zuchmanski
Created December 10, 2013 17:55
Show Gist options
  • Save zuchmanski/7895021 to your computer and use it in GitHub Desktop.
Save zuchmanski/7895021 to your computer and use it in GitHub Desktop.
-module(rAddressBookSup).
-export([start/0, startWithMonitoring/0, monitor/0]).
-beha
start() ->
spawn(?MODULE, startWithMonitoring, []).
startWithMonitoring() ->
process_flag(trap_exit, true),
rAddressBook:startLink([]),
monitor().
monitor() ->
receive
{'EXIT', Pid, Reason} ->
io:format("LAPIE"),
rAddressBook:startLink([]),
monitor()
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment