Ah, right, yes.

This commit is contained in:
Kevin Lange 2013-03-07 19:54:32 -08:00
parent 4960f3ff2f
commit 43097ebfc2

View File

@ -443,14 +443,14 @@ int main(int argc, char ** argv) {
if (sb[0] == TTYPE) { if (sb[0] == TTYPE) {
/* This was a response to the TTYPE command, meaning /* This was a response to the TTYPE command, meaning
* that this should be a terminal type */ * that this should be a terminal type */
alarm(0); alarm(2);
strcpy(term, &sb[2]); strcpy(term, &sb[2]);
done++; done++;
} }
else if (sb[0] == NAWS) { else if (sb[0] == NAWS) {
/* This was a response to the NAWS command, meaning /* This was a response to the NAWS command, meaning
* that this should be a window size */ * that this should be a window size */
alarm(0); alarm(2);
terminal_width = sb[2]; terminal_width = sb[2];
done++; done++;
} }
@ -521,6 +521,7 @@ int main(int argc, char ** argv) {
} }
} }
} }
alarm(0);
} else { } else {
/* We are running standalone, retrieve the /* We are running standalone, retrieve the
* terminal type from the environment. */ * terminal type from the environment. */