aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-08-18 19:56:02 +0200
committerSverker Eriksson <[email protected]>2017-11-15 20:10:33 +0100
commit17e198d6ee60f7dec9abfed272cf4226aea44535 (patch)
tree15d5eaa19c9e0533133b59c2c09261aedcdb7acc /erts/preloaded
parent3f5f22656a33aec1ba4ed01249732e32d08a8c50 (diff)
downloadotp-17e198d6ee60f7dec9abfed272cf4226aea44535.tar.gz
otp-17e198d6ee60f7dec9abfed272cf4226aea44535.tar.bz2
otp-17e198d6ee60f7dec9abfed272cf4226aea44535.zip
erts: Async auto-connect for monitor/2
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/src/erlang.erl21
1 files changed, 4 insertions, 17 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 9630c0c934..d63a413f21 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -3367,23 +3367,10 @@ dsend({Name, Node}, Msg, Opts) ->
-spec erlang:dmonitor_p('process', pid() | {atom(),atom()}) -> reference().
dmonitor_p(process, ProcSpec) ->
- %% ProcSpec = pid() | {atom(),atom()}
- %% ProcSpec CANNOT be an atom because a locally registered process
- %% is never handled here.
- Node = case ProcSpec of
- {S,N} when erlang:is_atom(S),
- erlang:is_atom(N),
- N =/= erlang:node() -> N;
- _ when erlang:is_pid(ProcSpec) -> erlang:node(ProcSpec)
- end,
- case net_kernel:connect(Node) of
- true ->
- erlang:monitor(process, ProcSpec);
- false ->
- Ref = erlang:make_ref(),
- erlang:self() ! {'DOWN', Ref, process, ProcSpec, noconnection},
- Ref
- end.
+ %% Only called when auto-connect attempt failed early in VM
+ Ref = erlang:make_ref(),
+ erlang:self() ! {'DOWN', Ref, process, ProcSpec, noconnection},
+ Ref.
%%
%% Trap function used when modified timing has been enabled.