Re: Questions about channels

2016-01-06 Thread Moe Aboulkheir
I just noticed you were actually using the exit code. In that case, you probably want something like (.on p "close" (fn [exit] (put! c [:exit exit]) (a/close! c)) Take care, Moe -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: Questions about channels

2016-01-06 Thread Moe Aboulkheir
On Wed, Jan 6, 2016 at 9:48 PM, 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 > showing an > approach that spawns the p

Re: Questions about channels

2016-01-06 Thread fahptv
Ah, I perhaps should be using node's spawnSync instead. But I'm still interested in what you think because perhaps in the future I might want to write a synchronous wrapper for some other js library which doesn't provide a sync alternative out of the box. On Wednesday, January 6, 2016 at 1:48:1

Questions about channels

2016-01-06 Thread fahptv
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 showing an approach that spawns the process and routes all output to a channel. My go