testdisplay: only set terminal attributes when in foreground process group
authorThomas Wood <thomas.wood@intel.com>
Thu, 24 Jul 2014 16:45:48 +0000 (17:45 +0100)
committerThomas Wood <thomas.wood@intel.com>
Fri, 25 Jul 2014 13:46:51 +0000 (14:46 +0100)
commit8408e00e623b52f18ad0795122593741197fa2f4
treec4ba4c55cabc2c68b95312641fa4a01e2055de55
parentb9e7637542364f9834c620ce2ee3b4ca11ba6f27
testdisplay: only set terminal attributes when in foreground process group

The Piglit test runner for intel-gpu-tools creates a new process group
for the test processes, so attempting to set terminal attributes causes
the process to receive SIGTTOU and be stopped. Since the test is not run
interactively in this case, the issue can be avoided by not setting
terminal attributes if the process is not in the foreground process
group.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
tests/testdisplay.c