<div dir="ltr"><div><div><div><div>Hi fellow erlangers,<br><br></div>I have a question regarding ssh. <br><br>If I run something like <code>'while sleep 0.01; do echo hello; done;'</code> using 'ssh_connection.exec/4' I get its virtually infinite output as a sequence of 'data' messages (<strong><span>{ssh_cm, ssh_connection_ref(),
         {data, ssh_channel_id(), ssh_data_type_code(), Data :: binary()}}</span></strong>).
 No other message (exit_signal, exit_status, etc.) is expected from an 
infinite output like this. Everything works as expected.<br><br> If I run something like <code>'while sleep 0.000001; do echo hello; done;'</code> or something like <code>'while true; do echo hello; done;'</code>
 then I get only a few messages, but then I stop receiving messages on 
my process' mailbox. I do not receive any other message either 
(exit_signal, exit_status, etc.) . Complete silence.<br><br></div><div>I
 see the remote process is still using CPU (I guess producing output) on
 the remote machine _after_ my process stops receiving data messages. 
After a few seconds it stops using CPU (I guess stops producing output).
 Then everything is stalled. My erlang process not receiving messages, 
and the remote process waiting.<br></div><div><br></div>This is all 
being done from an Elixir library, but I've reproduced from pure Erlang,
 so no problem from there. You can see it all in <a href="https://github.com/rubencaro/sshex/issues/4" target="_blank">https://github.com/rubencaro/sshex/issues/4</a>.<br><br></div>Maybe you can explain these symptoms from your knowledge. Can you help me?<br><br></div>Many thanks!</div>