我有一個問題,試圖寫入輸入到Linux進程。下面的代碼有云:無法寫入輸入到進程C#單聲道
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: Write fault on path /home/vinholi/Ubuntu One/Uso do linux em flash drives/Programa gerador de .deb/GeradorDeb/GeradorDeb/bin/Debug/[Unknown] at 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
您的堆棧跟蹤與您發佈的代碼無關。爲什麼? – 2013-03-14 00:48:15
對不起柯克沃爾,但我不明白你的意思。請考慮到我是初學者。 – 2013-03-14 01:17:48
我只是說你的堆棧跟蹤不包含任何你的代碼。 – 2013-03-14 02:21:31