[erlang-questions] Redirect -remsh output
Serge Aleynikov
saleyn@REDACTED
Fri Sep 26 13:59:16 CEST 2008
Mats,
Thanks for nailing this down! One little correction for those who will
use the patch is that this needs to be applied as a reverse patch.
Serge
Mats Cronqvist wrote:
> Serge Aleynikov wrote:
>> I believe you are right, as tab-expansion works only on some standard
>> modules (e.g. stdlib, kernel, etc) that are in the path on both nodes.
>>
>> So, adding the appropriate rpc:call/4 in both places should fix the
>> issue.
>>
> from the shell;
> io:setopts([{expand_fun,fun(B)->rpc:call(RemoteNode,edlin_expand,expand,[B])
> end}]).
>
> patch;
> --- /home/masse/wrk/user_drv.erl 2008-09-26 11:54:04.000000000 +0200
> +++ /usr/lib/erlang/lib/kernel-2.12.3/src/user_drv.erl 2008-07-20
> 07:14:47.000000000 +0200
> @@ -113,11 +113,7 @@
> case init:get_argument(remsh) of
> {ok,[[Node]]} ->
> RShell = {list_to_atom(Node),shell,start,[]},
> - RGr =
> - group:start(self(), RShell,
> - [{expand_fun,
> -
> fun(B)->rpc:call(Node,edlin_expand,expand,[B]
> - end)}]),
> + RGr = group:start(self(), RShell),
> {RGr,RShell};
> E when E =:= error ; E =:= {ok,[[]]} ->
> {group:start(self(), Shell),Shell}
>
>
More information about the erlang-questions
mailing list