I am trying to kill a process at first, I executed with
exec = require('child_process').exec;
exec('kill xxx', function(error, stdout, stderr) {
if (error) {
console.log('exec error: ', error);
}else{
console.log(stdout)
}
});
I noticed the kill program probably started a child process, whose output cannot be captured here as stdout.
So can I generally capture these console output which seem to be not very relevant with the code?