Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Commented Issue: Support for running continuous commands and returning the results as the occur (ex: “tail –f”) [666]

$
0
0
I would like the ability to run a command that is continuous on the unix side (requiring a cancel to end) and be able to see the results of said command as it occurs C# side. An example of this is tailing an active log file. The user would select a log file to tail, the SSH would connect to the unix server and send "tail -f [somelogfile]" and the results will stream in live into a container (in my case, a RichTextBox). When the user was done, or if they wanted to tail a different log file, the unix would properly cancel/kill that command and disconnect from the session (as to not leave active sessions open) and the process would repeat.
 
Thanks for all the hard work!
Comments: ** Comment from web user: gyoreg **

Hi Oleg,

pretty old thread, but it came up for me now...

Initially it did not work for me properly.. e.g. 'sleep 1'. Then I changed the SshCommand a bit, to send a PTY allocation request. Then it was fine.

However when I called a more complex script, it behaved exactly the opposite. It was fine with PTY allocation, the CancelAsync was hanging, without PTY allocation it looks fine now.

I don't really know what is behind. :(

Cheers,
Gabor


Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>