Logged In: NO

delete the line:
signal(SIGWINCH, newwinsize);