Commit 2b6c271d authored by topjohnwu's avatar topjohnwu

Initialize windows size

parent b0c1a6f7
...@@ -207,9 +207,6 @@ static void *watch_sigwinch(void *data) { ...@@ -207,9 +207,6 @@ static void *watch_sigwinch(void *data) {
sigaddset(&winch, SIGWINCH); sigaddset(&winch, SIGWINCH);
do { do {
// Wait for a SIGWINCH
sigwait(&winch, &sig);
if (closing_time) break; if (closing_time) break;
// Get the new terminal size // Get the new terminal size
...@@ -221,7 +218,7 @@ static void *watch_sigwinch(void *data) { ...@@ -221,7 +218,7 @@ static void *watch_sigwinch(void *data) {
// Set the new terminal size // Set the new terminal size
ioctl(slave, TIOCSWINSZ, &w); ioctl(slave, TIOCSWINSZ, &w);
} while (1); } while (sigwait(&winch, &sig) == 0);
free(data); free(data);
return NULL; return NULL;
...@@ -276,8 +273,6 @@ int watch_sigwinch_async(int master, int slave) { ...@@ -276,8 +273,6 @@ int watch_sigwinch_async(int master, int slave) {
return -1; return -1;
} }
// Set the initial terminal size
raise(SIGWINCH);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment