Is your od program flushing its output? Maybe its stuck in its internal buffers, not in the pipe.
On Sunday, June 28, 2015 at 4:34:20 AM UTC+10, Miguel Bazdresch wrote: > > To answer your question about Gaston first, when I wrote that code nearly > 3 years ago, there was no infrastructure in julia to create pipes to > external processes. That's why I went with popen from the C standard > library. I will update that code, but I want to read from both Gnuplot's > STDOUT and STDERR while writing to STDIN, which is not supported by Julia > at the moment. I'm trying to come up with a solution to that. > > Are you sure that your process `od` is printing to STDOUT and not STDERR? > > The crashes you're seeing look like worth opening an issue for, especially > if they're easy to reproduce. > > -- mb > > On Sat, Jun 27, 2015 at 11:49 AM, Laurent Bartholdi <[email protected] > <javascript:>> wrote: > >> Dear Miguel: >> Indeed, data is not made available to the pipe; though it should be >> there, because od prints lines as soon as they're available. I tried >> "readall", but it also blocks. I should have added that I tested this with >> the latest, 0.4 release from github. >> >> I also tried just reading one character, with "read(so,UInt8)", and this >> also blocks. >> >> I notice that you are the author of the gnuplot package "Gaston"; so you >> are certainly familiar with the issue. Looking at Gaston's code, I see that >> you directly called :popen from the C library. Is there a reason not to use >> the higher-level interface of Julia? >> >> I got more crashes by feeding large amounts of data to a pipe: >> >> julia> (so,si,pr) = readandwrite(`od`); >> >> julia> write(si,repeat("test\n",100000)); >> ^CERROR: InterruptException:Assertion failed: (req->handle == stream), >> function uv__write, file src/unix/stream.c, line 741. >> >> signal (6): Abort trap: 6 >> __pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line) >> Abort trap: 6 >> bash$ >> >> Thanks in advance! Laurent >> > >
