]> git.pld-linux.org Git - packages/poldek.git/blame - poldek-noloop_on_terminal_loos.patch
- make -j1 as it again created 0 byte poldek.conf
[packages/poldek.git] / poldek-noloop_on_terminal_loos.patch
CommitLineData
517e249f 1diff --git a/poldek_term.c b/poldek_term.c
2index 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.032727 seconds and 4 git commands to generate.