diff options
-rw-r--r-- | safetitle.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/safetitle.c b/safetitle.c index 7c24ab2..e5adac3 100644 --- a/safetitle.c +++ b/safetitle.c @@ -33,7 +33,7 @@ da(int fd, char *buf, int real) FD_ZERO(&fds); FD_SET(fd, &fds); timeout.tv_sec = 0; - timeout.tv_usec = 0; + timeout.tv_usec = 1; responses = 0; i = 0; @@ -94,7 +94,7 @@ main(int argc, char *argv[]) tcgetattr(ttyfd, &restore); tcgetattr(ttyfd, &term); term.c_lflag &= ~(ICANON|ECHO); - tcsetattr(ttyfd, TCSAFLUSH, &term); + tcsetattr(ttyfd, TCSANOW, &term); /* get device attributes for real terminal */ if(da(ttyfd, buf, 0)==-1){ @@ -117,7 +117,7 @@ main(int argc, char *argv[]) r = 0; end: - tcsetattr(ttyfd, TCSAFLUSH, &restore); + tcsetattr(ttyfd, TCSANOW, &restore); return r; usage: fprintf(stderr, "usage: %s [-d] title\n", argv[0]); |