x端末などの大きさを変えると、SIGWINCHが飛んでくる。 変わった後のLINESとCOLSの取得は、terminfoでなくてioctlでできる。 http://www.a-k-r.org/ruby-terminfo/rdoc/classes/TermInfo.src/M000029.html 前回作ったtermutilにも実装してみた。 var TERMUTIL=require('termutil'); var term=new TERMUTIL.Term(); process.on('SIGWINCH', function(){ console.log(term.size()+"\r"); }); term.on('keyinput', function(code){ if(code==0x71){ process.exit(); } }); term.listen(); conso