[erlang-questions] Unexpected behavior with -remsh via open_port

Joe DeVivo jdevivo@REDACTED
Tue Apr 16 15:58:42 CEST 2013


Hello! 

I've recently seen some unexpected behavior when trying to open_port to `erl -remsh`. You can see a more detailed version here (https://gist.github.com/joedevivo/5389301) but the interesting bit is below. Assume that 'node@REDACTED' is already running with the same cookie.

1>  P = open_port({spawn, "erl -name local@REDACTED -hidden -remsh node@REDACTED -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@REDACTED)1> ">>}}

As you can see, opening the port prompts with 'local@REDACTED'. If I had just run that command from my shell, it would prompt me with 'node@REDACTED'.

Does anyone know of a way I can get -remsh to work correctly with open_port?

Thanks,
--joe


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130416/5b0a3c5e/attachment.htm>


More information about the erlang-questions mailing list