Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 34596 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 13207 [details]
it contains: parent.cs (parent process); child.cs (child process); child (child script)
1) One "parent" process launches a "child" process.
2) The stardard input of the child process is redirected.
3) The parent process writes in the child process input.
4) The child process fails to read what the parent process wrote with ReadToEnd or ReadLine and got stuck.
* It worked with mono-4.0.4
* It failed with master/020a7c6 and master/5ab4c0d.
The code of parent and the client process is attached.
The way to execute the different scenario is:
parent.exe "child --readtoend" -----> hang
parent.exe "child --readtoend" "input line" -----> hang
parent.exe "child --readline" -----> hang
parent.exe "child --readline" "input line" -----> hang
parent.exe "child --read" -----> hang
parent.exe "child --read" "input line" -----> ok
I forgot to explain the parameters of the execution examples (although I think that the code is pretty easy).
* parent.exe (the name of the parent process assembly).
* "child --xxx" (the name of the child process executable, it invokes a 'mono child.exe' script) plus the mode that will use the child process to read from the console input.
** --readtoend -> it will do a Console.In.ReadToEnd();
** --readline -> it will do Console.ReadLine() reads.
** --read -> it will do Console.Read() reads checking if there are something to read with Console.In.Peek()
* "input line" -> the parent process will write the following parameters to the standard input of the child process. In this case, it will write just one "input line".
** if this parameter is missing the parent process will write nothing.