<div dir="ltr">Hi!<div><br></div><div>Just terminate your channel process and the channel behavior will take</div><div>care of closing the channel correctly. </div><div><br></div><div>Regards Ingela Erlang/OTP team - Ericsson AB</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">2015-09-07 15:14 GMT+02:00 Vipin Nair <span dir="ltr"><<a href="mailto:swvist@gmail.com" target="_blank">swvist@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am calling ssh_connection:exec/4 from a process implementing<br>
the ssh_channel behaviour. I want to ensure that all commands<br>
exit within some time limit. Say, someone runs a tail -f<br>
/var/log/syslog, I want to ensure that this is not run beyond X<br>
seconds.<br>
<br>
My idea was to close the channel after the timeout, but I am not<br>
sure how to do this. There may be multiple channel established<br>
over the same connection so I cannot kill the connection. How<br>
should I do this?<br>
<br>
A quick glance at the RFC[1] shows that either party can close<br>
the channel. So this perhaps could be added as a new public api<br>
in ssh_channel module.<br>
<br>
[1]: <a href="https://www.ietf.org/rfc/rfc4254.txt" rel="noreferrer" target="_blank">https://www.ietf.org/rfc/rfc4254.txt</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Regards,<br>
Vipin<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</font></span></blockquote></div><br></div></div></div>