summaryrefslogtreecommitdiffstats
path: root/usr.bin/talk/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/talk/io.c')
-rw-r--r--usr.bin/talk/io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.bin/talk/io.c b/usr.bin/talk/io.c
index 6cfa7f1..00b2548 100644
--- a/usr.bin/talk/io.c
+++ b/usr.bin/talk/io.c
@@ -48,6 +48,7 @@ static const char sccsid[] = "@(#)io.c 8.1 (Berkeley) 6/6/93";
#include <sys/filio.h>
#include <errno.h>
+#include <signal.h>
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
@@ -58,6 +59,8 @@ static const char sccsid[] = "@(#)io.c 8.1 (Berkeley) 6/6/93";
#define A_LONG_TIME 10000000
+volatile sig_atomic_t gotwinch = 0;
+
/*
* The routine to do the actual talking
*/
@@ -106,6 +109,10 @@ talk()
wait.tv_sec = A_LONG_TIME;
wait.tv_usec = 0;
nb = select(32, &read_set, 0, 0, &wait);
+ if (gotwinch) {
+ resize_display();
+ gotwinch = 0;
+ }
if (nb <= 0) {
if (errno == EINTR) {
read_set = read_template;
OpenPOWER on IntegriCloud