mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-09 17:06:14 +00:00
lib: Don't wait in igt_wait_for_keypress() if stdin is not a tty
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>
This commit is contained in:
parent
0d5de66fc6
commit
3386b4b286
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user