You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, if you try to pipe a program's output into a non-existent program on Unix, you will get an IOException on the first call to Console.Write(Line) (and probably other paths):
Unhandled Exception: System.IO.IOException: Broken pipe
at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter)
at System.ConsolePal.Write(Int32 fd, Byte[] buffer, Int32 offset, Int32 count)
at System.ConsolePal.UnixConsoleStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.SyncTextWriter.WriteLine(String value)
at System.Console.WriteLine(String value)
I chatted with Stephen briefly and we thought that it might be sensible to just ignore this particular exception (in Interop.CheckIO) and allow the program to continue. That is, if we are able to easily detect such a case, and are still able to correctly throw if some other error occurs. How do others feel about this? This seems to be in line with what other programs do if piped into a bad program.
The text was updated successfully, but these errors were encountered:
Right now, if you try to pipe a program's output into a non-existent program on Unix, you will get an IOException on the first call to Console.Write(Line) (and probably other paths):
I chatted with Stephen briefly and we thought that it might be sensible to just ignore this particular exception (in Interop.CheckIO) and allow the program to continue. That is, if we are able to easily detect such a case, and are still able to correctly throw if some other error occurs. How do others feel about this? This seems to be in line with what other programs do if piped into a bad program.
The text was updated successfully, but these errors were encountered: