javascript - Node.js exec call never calls callback -


i have node.js script makes call exec never calls callback. code:

var exec = require('child_process').exec; exec("{command} > results.log", function (error, stdout, stderr) {   console.log('callback called!'); // never gets called. }); 

i'm using async lib , i'm relying on exec callback called can in turn call async callback continue execution flow. command indeed executed, see output results.log file. doing wrong here?

you're piping returned result file, never returns node.

exec("{command}", function (error, stdout, stderr) {   console.log('callback called!'); // never gets called. }); 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -