ShellStream
copies from output stream back to input stream when Task.Delay
is used
#1168
Milestone
ShellStream
copies from output stream back to input stream when Task.Delay
is used
#1168
Problem
Shell copies output stream back to input stream when
Task.Delay
is called.How to reproduce
What effects it have:
It does create
file.txt
with contenttouch very_dangerous_command.txt
It prints to output buffer
touch very_dangerous_command.txt
It does remove
file.txt
.But when
history
is called it repeats everything back inside of itself and in the end on my remote machine I have both files 'file.txt' and 'very_dangerous_command.txt' which is nuts. =/interestingly, without
Task.Delay()
calls it works just fine.Results
Files in the

/root
on server before program execution and after.Text file that shows what is happening to shell. There is a lot of repeated/misplaced commands, which leads to chaos.
output.txt
Setup
dotnet 7.0.105
"SSH.NET" Version="2020.0.2
Linux myhostname 6.3.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 14 Jun 2023 20:10:31 +0000 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: