File 1786-Add-missing-documented-function.patch of Package erlang
From bb4a660bbfb39a570ee3f3ae47bcebf8036c55f1 Mon Sep 17 00:00:00 2001
From: Benedikt Reinartz <filmor@gmail.com>
Date: Tue, 10 Jan 2023 11:14:26 +0100
Subject: [PATCH 06/12] Add missing documented function
---
lib/observer/src/observer.erl | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/observer/src/observer.erl b/lib/observer/src/observer.erl
index 0a2ffe5daa..a130f9d494 100644
--- a/lib/observer/src/observer.erl
+++ b/lib/observer/src/observer.erl
@@ -19,7 +19,7 @@
-module(observer).
--export([start/0, start/1, start_and_wait/1, stop/0]).
+-export([start/0, start/1, start_and_wait/0, start_and_wait/1, stop/0]).
start() ->
@@ -34,6 +34,14 @@ start([Node]) ->
observer_wx:set_node(Node1),
Res.
+start_and_wait() ->
+ ok = start(),
+ MonitorRef = monitor(process, observer),
+ receive
+ {'DOWN', MonitorRef, process, _, _} ->
+ ok
+ end.
+
start_and_wait(Node) when is_atom(Node) ->
start_and_wait([Node]);
start_and_wait(List) when is_list(List) ->
--
2.35.3