Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 单声道读取后进程输出未正确显示_C#_Mono - Fatal编程技术网

C# 单声道读取后进程输出未正确显示

C# 单声道读取后进程输出未正确显示,c#,mono,C#,Mono,我似乎在mono中遇到了一个bug,或者我做错了什么 我使用子进程通过C#完成任务,但在某些情况下,终端会因未正确显示我键入的内容而中断。我用控制台读了一行之后,就成功地把这件事归结为发生了 我现在在Mac上使用mono版本mono JIT编译器3.10.0版,但不知道这是mono还是Windows上会发生 我能够在中重新创建错误的最低代码如下: using System; using System.Diagnostics; namespace Test { class MainCla

我似乎在mono中遇到了一个bug,或者我做错了什么

我使用子进程通过C#完成任务,但在某些情况下,终端会因未正确显示我键入的内容而中断。我用控制台读了一行之后,就成功地把这件事归结为发生了

我现在在Mac上使用mono版本mono JIT编译器3.10.0版,但不知道这是mono还是Windows上会发生

我能够在中重新创建错误的最低代码如下:

using System;
using System.Diagnostics;

namespace Test
{
    class MainClass
    {
        public static void Main( string[] args )
        {
            Console.ReadLine();

            Process.Start("tee","text.txt").WaitForExit();            
        }
    }
}
如果删除读取行,输入后将打印tee的输出(因此您将看到同一行两次),但读取行仅显示tee的输出,而不显示您键入的输入

即: 没有读线

~/test $ mcs program.cs && mono program.exe
this 
this 
is 
is 
writting 
writting 
to 
to 
file 
file 
^C 

~/test $ cat text.txt 
this
is
writting
to
file
~/test $ mcs program.cs && mono program.exe
readline
this
should
be 
printing
as well

~/test $ cat text.txt
this
should
be 
printing
as well
还有读线

~/test $ mcs program.cs && mono program.exe
this 
this 
is 
is 
writting 
writting 
to 
to 
file 
file 
^C 

~/test $ cat text.txt 
this
is
writting
to
file
~/test $ mcs program.cs && mono program.exe
readline
this
should
be 
printing
as well

~/test $ cat text.txt
this
should
be 
printing
as well