【io:getopts()】
2>io:getopts().[{expand_fun,#Fun<group.0.100149429>},
{echo,true},
{binary,false},
{encoding,unicode}]
3> flush() ->
receive
X ->
case lists:keyfind(encoding, 1, io:getopts()) of
{encoding,unicode} ->
format("Shell got ~tp~n",);
_ ->
format("Shell got ~p~n",)
end,
flush()
after 0 ->
ok
end.同时也可以在shell 的flush中见到 group就是指的是group_leader的id
default_input() ->
group_leader().
页:
[1]