RedirectStandardInput crashes program
Posted
by Roman
on Stack Overflow
See other posts from Stack Overflow
or by Roman
Published on 2010-03-26T20:11:48Z
Indexed on
2010/03/26
20:13 UTC
Read the original article
Hit count: 296
c#
Hi,
the following code is to open a console application (which uses pdcurses for output, nothing special):
myProcess.StartInfo.FileName = "some.exe";
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.CreateNoWindow = false;
myProcess.StartInfo.RedirectStandardInput = true;
myProcess.Start();
The Problem is that it opens the designated window but directly closes it (it's barely visible). Starting the program without RedirectStandardInput works. The problem is that it does not throw an exception nor any error-message. What is wrong with my code? How can I write input to the program? Thanks.
© Stack Overflow or respective owner