Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 erlang 节点启动一些程序,将一些数据传输到其标准输入并在完成后读取标准输出。可能吗?
是的,我现在介绍 C 节点,但我不想重写我的二进制应用程序。
我使用 open_port:
run (Cmd, Params, State, Stage, PrevStage) -> Shell = Cmd ++ " " ++ binary_to_list (Params) ++ " 1>/dev/null 2>/dev/null", io:format ("try to run: ~p~n", [Shell]), Port = open_port ({spawn, Shell}, [exit_status]),