On Monday, October 6, 2014 2:52:02 AM UTC-4, Saúl Ibarra Corretgé wrote: > On 04/10/14 19:52, Scott Prager wrote: > > I saw a test named "spawn_same_stdout_stderr": > > https://github.com/joyent/libuv/blob/master/test/test-spawn.c#L643 > > > > ...and I thought that would answer my question, but in trying to copy > > it, it did not work. (It looks like all it does is sets > > "options.stdio_count = 2;") > > > > options.stdio[0] refers to stdin and options.stdio[1] refers to stdout. > What that test does is initialize a couple of pipes, one for each > direction and instructs uv_spawn to create a readable and writable pipe > respectively: > https://github.com/joyent/libuv/blob/master/test/test-spawn.c#L656-L659 >
No misunderstandings there, but I need options.stdio[1] and [2] to refer to a joined stream. > > Can you gist your full test? > At least I can mock it: https://gist.github.com/splinterofchaos/fc1f27bbd5aa38ef32c3 It runs "make" on a bad c file and outputs "gcc err.c", but not the error. The code base I'm working on uses libuv v0.11.28. Technically, I could use a separate pipe and callback for stderr, but I need the order of outputs preserved. When I attempted to use separate pipes (for much larger input than that gist), I found the errors clumped together and inconsistent the regular output. The code I'm working on used to do something akin to `system("make 2>&1 outfile")` to get such an affect. > > > -- > Saúl Ibarra Corretgé > http://bettercallsaghul.com > -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
