Dynamically size terminal using SIGWINCH