summaryrefslogtreecommitdiff
path: root/procps/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/top.c')
-rw-r--r--procps/top.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/procps/top.c b/procps/top.c
index 908ae81..1d22871 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -649,7 +649,7 @@ static void clearmems(void)
static void reset_term(void)
{
- tcsetattr(0, TCSANOW, &initial_settings);
+ tcsetattr_stdin_TCSANOW(&initial_settings);
if (ENABLE_FEATURE_CLEAN_UP) {
clearmems();
#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
@@ -941,7 +941,7 @@ int top_main(int argc UNUSED_PARAM, char **argv)
new_settings.c_lflag &= ~(ISIG | ICANON | ECHO | ECHONL);
bb_signals(BB_FATAL_SIGS, sig_catcher);
- tcsetattr(0, TCSANOW, (void *) &new_settings);
+ tcsetattr_stdin_TCSANOW(&new_settings);
#endif /* FEATURE_USE_TERMIOS */
#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE