bug fix in handling "CSI m" without arguments
export TIOCSWINSZ and singal handling
propagate this exception, don't loop
exposed this to outside