Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:18
erlang
0749-GH-4396-exported-function-instead-of-fun-t...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0749-GH-4396-exported-function-instead-of-fun-to-set-up-r.patch of Package erlang
From 9d74726bee1c8ec498068e1467ae6392b9999b76 Mon Sep 17 00:00:00 2001 From: Kjell Winblad <kjellwinblad@gmail.com> Date: Mon, 3 May 2021 09:57:36 +0200 Subject: [PATCH] GH-4396: exported function instead of fun to set up remote tracing The function `dbg:n/1` used a local fun to set up a tracer on a remote node. This works fine as long as the remote node is running exactly the same version of Erlang/OTP but does not work at all otherwise. This is fixed by exporting the relevant function (`dbg:do_relay/2`) and by calling this function on the remote node to set up remote tracing. --- lib/runtime_tools/src/dbg.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl index 92938ed5c1..41410bebf0 100644 --- a/lib/runtime_tools/src/dbg.erl +++ b/lib/runtime_tools/src/dbg.erl @@ -34,7 +34,7 @@ -export([fun2ms/1]). %% Local exports --export([erlang_trace/3,get_info/0,deliver_and_flush/1]). +-export([erlang_trace/3,get_info/0,deliver_and_flush/1,do_relay/2]). %% Debug exports -export([wrap_presort/2, wrap_sort/2, wrap_postsort/1, wrap_sortfix/2, @@ -942,9 +942,9 @@ erlang_trace(AtomPid, How, Flags) -> relay(Node,To) when Node /= node() -> case get(Node) of - undefined -> + undefined -> S = self(), - Pid = spawn_link(Node, fun() -> do_relay(S,To) end), + Pid = spawn_link(Node, dbg, do_relay, [S, To]), receive {started,Remote} -> put(Node, {Pid,Remote}) end, {ok,Pid}; {_Relay,PortOrPid} -> -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor