Here is the code i wrote,when i execute the code,the terminal didn't output anything and the program is blocked
var util=require('util') var exec=require('child_process').exec; exec('iostat 5',function(err,stdout,stderr){ util.puts("hello") util.puts(stdout) }) If i change the exec command like this: it works and outputs the file list
var util=require('util') var exec=require('child_process').exec; exec('ls -al',function(err,stdout,stderr){ util.puts("hello") util.puts(stdout) }) is there any diffent between a block command(iostat) and nonbolck command(ls)?