In the following code
process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(chunk) { process.stdout.write('data: ' + chunk); }); process.stdin.on('end', function() { process.stdout.write('end'); });
I cannot fire the "end" event using ctrl + D, and ctrl + C just exit without calling it.
hello data: hello data data: data foo data: foo ^F data: β ^N data: β« ^D data: β¦ ^D^D data: β¦β¦
source share