Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't fail if subprocess finished (#166)
e.g. the user exited `less` before all results were written... example from joern _before_ this PR: ``` importCpg("/home/mp/tmp/cpgtesting/linux-kernel/linux6-drivers-scsi.fg") cpg.method.name.browse Exception in thread "less stdin thread" java.io.IOException: Broken pipe at java.base/java.io.FileOutputStream.writeBytes(Native Method) at java.base/java.io.FileOutputStream.write(FileOutputStream.java:349) at java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:123) at java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234) at java.base/sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:304) at java.base/sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282) at java.base/sun.nio.cs.StreamEncoder.write(StreamEncoder.java:132) at java.base/java.io.OutputStreamWriter.write(OutputStreamWriter.java:205) at java.base/java.io.BufferedWriter.flushBuffer(BufferedWriter.java:120) at java.base/java.io.BufferedWriter.write(BufferedWriter.java:233) at replpp.Operators$$anon$1.processInput$$anonfun$1(Operators.scala:140) at java.base/java.lang.Thread.run(Thread.java:840) ``` This PR silences this issue.
- Loading branch information