projects
/
platform
/
upstream
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d5de66
)
lib: Don't wait in igt_wait_for_keypress() if stdin is not a tty
author
Damien Lespiau
<damien.lespiau@intel.com>
Tue, 11 Feb 2014 13:54:10 +0000
(13:54 +0000)
committer
Damien Lespiau
<damien.lespiau@intel.com>
Tue, 11 Feb 2014 13:54:10 +0000
(13:54 +0000)
When running in a non interactive terminal, there's little point in
trying to wait for some input on stdin.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
lib/drmtest.c
patch
|
blob
|
history
diff --git
a/lib/drmtest.c
b/lib/drmtest.c
index
24362bd
..
28651ce
100644
(file)
--- a/
lib/drmtest.c
+++ b/
lib/drmtest.c
@@
-1710,6
+1710,9
@@
void igt_wait_for_keypress(void)
{
struct termios oldt, newt;
+ if (!isatty(STDIN_FILENO))
+ return;
+
tcgetattr ( STDIN_FILENO, &oldt );
newt = oldt;
newt.c_lflag &= ~( ICANON | ECHO );