]> git.pld-linux.org Git - packages/poldek.git/blob - poldek-noloop_on_terminal_loos.patch
This commit was manufactured by cvs2git to create branch 'AC-DEVEL'.
[packages/poldek.git] / poldek-noloop_on_terminal_loos.patch
1 diff --git a/poldek_term.c b/poldek_term.c
2 index 2ee6b66..fec05de 100644
3 --- a/poldek_term.c
4 +++ b/poldek_term.c
5 @@ -287,6 +287,10 @@ int poldek_term_ask(int fd, const char *validchrs, const char *msg)
6          if ((read(fd, &c, sizeof(c)) == 1) && strchr(validchrs, c))
7              break;
8  
9 +        // terminal lost - so prevent loop
10 +        if (!isatty(fd))
11 +            return 0;
12 +
13          if (msg)
14              printf("%s\n", msg);
15      }
This page took 0.040555 seconds and 3 git commands to generate.