Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
*Window A*
➜ ~ erl -name node@127.0.0.1 -setcookie joe
*Window B*
# 1, try starting erl with -remsh via open_port
➜ ~ erl
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:4:4] [async-threads:0] [kernel-poll:false]
Eshell V5.9.3.1 (abort with ^G)
1> P = open_port({spawn, "erl -name local@127.0.0.1 -hidden -remsh node@127.0.0.1 -setcookie joe"},
1> [stream, use_stdio, exit_status, binary, stderr_to_stdout]).
#Port<0.517>
2> flush().
Shell got {#Port<0.517>,{data,<<"Eshell V5.9.3.1 (abort with ^G)\n">>}}
Shell got {#Port<0.517>,{data,<<"(local@127.0.0.1)1> ">>}}
ok
3> port_command(P, "node().\n").
true
4> flush().
Shell got {#Port<0.517>,{data,<<"'local@127.0.0.1'\n">>}}
Shell got {#Port<0.517>,{data,<<"(local@127.0.0.1)2> ">>}}
ok
5> q().
ok
# 2, run the same command we ran with open_port from the command line
➜ ~ erl -name local@127.0.0.1 -hidden -remsh node@127.0.0.1 -setcookie joe
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:4:4] [async-threads:0] [kernel-poll:false]
Eshell V5.9.3.1 (abort with ^G)
(node@127.0.0.1)1> node().
'node@127.0.0.1'
(node@127.0.0.1)2> q().
ok
(node@127.0.0.1)3>
User switch command
--> q
THE NODE NAMES ARE DIFFERENT!!!!!
@joedevivo
Owner

I would have expected node@127.0.0.1 on lines #15, #20 and #21

@joedevivo
Owner

Why would I do this? to test basho/riak#254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.