aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/src/cover.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tools/src/cover.erl')
-rw-r--r--lib/tools/src/cover.erl18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl
index dfcfc3675f..bf21aa6b48 100644
--- a/lib/tools/src/cover.erl
+++ b/lib/tools/src/cover.erl
@@ -721,6 +721,11 @@ main_process_loop(State) ->
end,
State#main_state.nodes),
reload_originals(State#main_state.compiled),
+ ets:delete(?COVER_TABLE),
+ ets:delete(?COVER_CLAUSE_TABLE),
+ ets:delete(?BINARY_TABLE),
+ ets:delete(?COLLECTION_TABLE),
+ ets:delete(?COLLECTION_CLAUSE_TABLE),
unregister(?SERVER),
reply(From, ok);
@@ -876,6 +881,8 @@ remote_process_loop(State) ->
{remote,stop} ->
reload_originals(State#remote_state.compiled),
+ ets:delete(?COVER_TABLE),
+ ets:delete(?COVER_CLAUSE_TABLE),
unregister(?SERVER),
ok; % not replying since 'DOWN' message will be received anyway
@@ -1139,9 +1146,14 @@ remote_collect(Module,Nodes,Stop) ->
do_collection(Node, Module, Stop) ->
CollectorPid = spawn(fun collector_proc/0),
- remote_call(Node,{remote,collect,Module,CollectorPid, self()}),
- if Stop -> remote_call(Node,{remote,stop});
- true -> ok
+ case remote_call(Node,{remote,collect,Module,CollectorPid, self()}) of
+ {error,node_dead} ->
+ CollectorPid ! done,
+ ok;
+ ok when Stop ->
+ remote_call(Node,{remote,stop});
+ ok ->
+ ok
end.
%% Process which receives chunks of data from remote nodes - either when