我在尝试将输入写入 linux 进程时遇到问题。代码如下:
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.WorkingDirectory = "'/home/"+user+"/pacotes/"+nome_pacote.Text+"-1.0/'";
process.StartInfo.FileName="dh_make";
process.StartInfo.Arguments="-n -s";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardInput = true;
process.Start();
Thread.Sleep(3000);
process.StandardInput.WriteLine();
这是错误:
System.IO.IOException:路径 /home/vinholi/Ubuntu One/Uso do linux em flash drive/Programa gerador de .deb/GeradorDeb/GeradorDeb/bin/Debug/[Unknown] 在 System.IO.FileStream.FlushBuffer 上出现写入错误(System.IO.Stream st) [0x00000] in :0 at System.IO.FileStream.FlushBuffer () [0x00000] in :0 at System.IO.FileStream.Dispose (Boolean disposing) [0x00000] in :0