<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi erlang expets,</div><div><br></div><div>I met a problem about the erlang port "tty_sl -c- e".</div><div><br></div><div>The scenario is like this:</div><div>1) I start two erlang nodes (Lets say one is Node1, another one is Node2) by run_erl, they are connected together.</div><div>    I can login to these two nodes by to_erl and do anythings on the erlang shell. It run very well.</div><div><br></div><div>2) But today I tried to use to_erl to login to the Node1, I can`t type anything on the shell, it seems the shell is hanging;</div><div>   Then I login to the Node2 and run rpc:call(node1, shell, start, []) to start a new shell on Node1, and I check the port </div><div>   info of the port "tty_sl -c -e", it shows below:</div><div><div><span style="color: rgb(255, 0, 0);">(node1@servicer_3_1)7> Port.</span></div><div><span style="color: rgb(255, 0, 0);">#Port<0.4832>               </span></div><div><span style="color: rgb(255, 0, 0);">(node1@servicer_3_1)8> erlang:port_info(Port).</span></div><div><span style="color: rgb(255, 0, 0);">[{name,"tty_sl -c -e"},     </span></div><div><span style="color: rgb(255, 0, 0);"> {links,[]},          </span></div><div><span style="color: rgb(255, 0, 0);"> {id,38656},</span></div><div><font color="#ff0000"> {connected,<0.1502.0>},   </font></div><div><span style="color: rgb(255, 0, 0);"> {input,2552},</span></div><div><span style="color: rgb(255, 0, 0);"> {output,1751871},</span></div><div><span style="color: rgb(255, 0, 0);"> {os_pid,undefined}]</span></div></div><div><span style="color: rgb(255, 0, 0);"><br></span></div><div>you can see here, the "links" is empty and the connected process does`t exist.</div><div><div><span style="color: rgb(255, 0, 0);">(node1@servicer_3_1)3> erlang:process_info(pid(0, 1502, 0)).</span></div><div><span style="color: rgb(255, 0, 0);">undefined   </span></div></div><div><span style="color: rgb(255, 0, 0);"><br></span></div><div><font color="#ff0000"><span style="color: rgb(0, 0, 0);">3) I tried to close the port by erlang:port_close(Port), the result is as below:</span></font></div><div><div><span style="color: rgb(255, 0, 0);">(titan1_ps3@servicer_3_1)4> erlang:port_close(Port).</span></div><div><span style="color: rgb(255, 0, 0);">** exception error: bad argument</span></div><div><span style="color: rgb(255, 0, 0);">     in function  port_close/1</span></div><div><span style="color: rgb(255, 0, 0);">        called as port_close(#Port<0.4832>)</span></div></div><div><span style="color: rgb(255, 0, 0);"><br></span></div><div>It seems the port already died.</div><div><font color="#ff0000"><span style="color: rgb(0, 0, 0);">As I know, the port will be closed if the linked process dies. But here we can see the port does`t exit. </span></font></div><div><font color="#ff0000"><span style="color: rgb(0, 0, 0);">Do you know what is the reason? Or how can I kill the port?</span></font></div><div><font color="#ff0000"><br></font></div><div><font color="#ff0000"><span style="color: rgb(0, 0, 0);">Actually  I met this problem several times before, I had to reboot the</span></font> node the fix.</div><div><br></div><div><font color="#ff0000"><span style="color: rgb(0, 0, 0);">Thanks,</span></font></div><div><font color="#ff0000"><span style="color: rgb(0, 0, 0);">BRs/Michael</span></font></div></div><br><br><span title="neteasefooter"><p> </p></span>