On Wed, Jan 6, 2016 at 9:48 PM, <fah...@gmail.com> wrote: > I'm using ClojureScript and nodejs and I'd like to spawn a child process > and deal with the result (stderr, stdout, exit code). > > Here's a short gist > <https://gist.github.com/frankhenderson/d60471e64faec9e2158c> showing an > approach that spawns the process and routes all output to a channel. My > goal is to allow the calling code to be written in a straightforward manner > instead of having a lot of callbacks. >
I made some changes which you may find useful: https://gist.github.com/moea/6871166bb1fdb462efe4 - Close channel rather than :exit message - Have "exec" add timeout functionality only - the accumulation can be done via async/into. - Modify "exec" and "exec-chan" to take in optional channels, to enable higher order-transformations. This complicates the implementation, but is likely to be useful if you plan on using the code. I haven't run it or anything, hope it's helpful. Take care, Moe -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.