1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-module(eco_watcher).
-export([watcher/1]).
watcher(Super) ->
receive
{From, stop} ->
From ! {ok, stopped},
{ok, stopped};
{error, notock, A, B} ->
Super ! {error, notock, A, B},
io:format("~p~n", [{error, notock, A, B}]),
watcher(Super);
Msg ->
io:format("~p~n", [Msg]),
watcher(Super)
end.
|