jeudi 16 avril 2015

Node-webkit app get process output instantly

I have a node webkit app. In the app, I create 4 processes to run different programs. How can I link the program outputs to show up on my app in real-time. Essentially, I want an app that can monitor the progress of the 4 programs running in real-time.


Right now, I have the following. However, I only get data when the process finishes executing.



spawn = require(child_process').spawn
fb = spawn('python', [fb.py])
fb.stdout.on('data', function(data) {
console.log(data)
}

Aucun commentaire:

Enregistrer un commentaire