File 0228-Ensure-that-lcnt-server-is-terminated-after-lcnt-sto.patch of Package erlang

From fc1b02a54ead68e1544da3c1ba7e26650c9e90e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Fri, 4 May 2018 12:44:33 +0200
Subject: [PATCH] Ensure that lcnt server is terminated after lcnt:stop/0

This makes the nightly tests slightly more stable as they assert
that the server isn't alive when lcnt:start/0 is called, which it
could still be since the stop command was a plain gen_server call
that didn't wait until the termination was completed.
---
 lib/tools/src/lcnt.erl | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/tools/src/lcnt.erl b/lib/tools/src/lcnt.erl
index d0152a4915..1db90c1d86 100644
--- a/lib/tools/src/lcnt.erl
+++ b/lib/tools/src/lcnt.erl
@@ -132,7 +132,7 @@
 %% -------------------------------------------------------------------- %%
 
 start()  -> gen_server:start({local, ?MODULE}, ?MODULE, [], []).
-stop()   -> gen_server:call(?MODULE, stop, infinity).
+stop()   -> gen_server:stop(?MODULE, normal, infinity).
 init([]) -> {ok, #state{ locks = [], duration = 0 } }.
 
 %% -------------------------------------------------------------------- %%
@@ -409,9 +409,6 @@ handle_call({save, Filename}, _From, State) ->
 	    {reply, {error, Error}, State}
     end;
 
-handle_call(stop, _From, State) ->
-    {stop, normal, ok, State};
-
 handle_call(Command, _From, State) ->
     {reply, {error, {undefined, Command}}, State}.
 
-- 
2.16.3

openSUSE Build Service is sponsored by