summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2017-10-04 15:01:47 +0300
committerLen Brown <len.brown@intel.com>2018-06-01 12:13:05 -0400
commit47936f944e7816296888fb4c135f40635083080b (patch)
tree37f1a60f99190a7b19887dce26cf739ec0c0503b /.gitignore
parentb9ad8ee0da54b2b4d2f8cd50fc9ce5200d61e7d1 (diff)
downloadop-kernel-dev-47936f944e7816296888fb4c135f40635083080b.zip
op-kernel-dev-47936f944e7816296888fb4c135f40635083080b.tar.gz
tools/power turbostat: fix printing on input
The recent patch that implements table printing on a keypress introduced a regression - turbostat prints the table almost continuously if it is run from a daemon program. The problem is also easy to reproduce like this: echo | turbostat The reason is that we cannot assume that stdin is always a TTY. It can be many things. This patch adds fixes the problem by limiting the new keypress functionality to TTYs only. If stdin is not a TTY, we just sleep for the full interval time. While on it, clean-up 'do_sleep()' to return no value, as callers do not expect that anyway. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud