Tag: neo4j processstartinfo

在reader.ReadLine()之后进程窗口不能继续

我使用Process对接Neo4j Docker镜像。 在执行操作之前,我需要确保图像正确对接。 正如你在这里看到的,我将Docker Toolbox的标准输出redirect到Process窗口,然后写入Docker Toolbox正在做的任何事情。 但是,在图像停靠之后,根本不会进行并停留在该状态。 除了while循环之外的所有代码都不会被执行。 ProcessStartInfo psi = new ProcessStartInfo(); psi.WindowStyle = ProcessWindowStyle.Normal; psi.FileName = ConfigurationManager.AppSettings["Bash"]; psi.WorkingDirectory = ConfigurationManager.AppSettings["ToolBox"]; psi.Arguments = BuildArgumentString(); psi.UseShellExecute = false;//set to false to redirect standard output psi.RedirectStandardOutput = true; Process process = Process.Start(psi); StreamReader reader = process.StandardOutput; while (!reader.EndOfStream) { Console.WriteLine(reader.ReadLine()); } //codes beyond this while loop […]