packages: poldek/poldek-noloop_on_terminal_loos.patch (NEW) - LP#499504
cactus
cactus at pld-linux.org
Thu Feb 4 22:20:04 CET 2010
Author: cactus Date: Thu Feb 4 21:20:04 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- LP#499504
---- Files affected:
packages/poldek:
poldek-noloop_on_terminal_loos.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/poldek/poldek-noloop_on_terminal_loos.patch
diff -u /dev/null packages/poldek/poldek-noloop_on_terminal_loos.patch:1.1
--- /dev/null Thu Feb 4 22:20:04 2010
+++ packages/poldek/poldek-noloop_on_terminal_loos.patch Thu Feb 4 22:19:58 2010
@@ -0,0 +1,15 @@
+diff --git a/poldek_term.c b/poldek_term.c
+index 2ee6b66..fec05de 100644
+--- a/poldek_term.c
++++ b/poldek_term.c
+@@ -287,6 +287,10 @@ int poldek_term_ask(int fd, const char *validchrs, const char *msg)
+ if ((read(fd, &c, sizeof(c)) == 1) && strchr(validchrs, c))
+ break;
+
++ // terminal lost - so prevent loop
++ if (!isatty(fd))
++ return 0;
++
+ if (msg)
+ printf("%s\n", msg);
+ }
================================================================
More information about the pld-cvs-commit
mailing list