Convince the command not to buffer. It is probably written such that if it thinks stdout is a tty it line-buffers, but if stdout is a pipe it block-buffers.
In perl you do this via "$|++". The app may have a command-line flag for it if you're lucky. On Tue, Feb 16, 2016 at 5:50 PM, Hoa Phan <[email protected]> wrote: > So I have something like: > > function startWebApp(command, arguments) { > var childProc = require("child_process").exec(command, arguments); > childProc.stdout.pipe(process.stdout); > childProc.on("exit", process.exit); > } > > > The output seems to be buffered and result seems to be delayed, it only > printed after some interval compared to when I runs the "command" directly in > bash. > > Is there a way around this. > > > Thanks and Regards, > > > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > Old group rules: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > --- > You received this message because you are subscribed to the Google Groups > "nodejs" 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/b2220317-a2fa-47d3-bd7e-5c6b005532d3%40googlegroups.com > <https://groups.google.com/d/msgid/nodejs/b2220317-a2fa-47d3-bd7e-5c6b005532d3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAPJ5V2aB%2BiQQuOt-N0pA96dS4mqG4vgS9DNiSsyqZwHwPK4Yzw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
