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
Post a Comment