scroll

scrollbackbuffer program for st
git clone git://git.suckless.org/scroll
Log | Files | Refs | README

commit aa683cbd8388e9bd3ae2c961a9fce47d519e2d2f
parent d1c2d2ad0efb4d029ed130443ea88095e153639e
Author: Jan Klemkow <j.klemkow@wemelug.de>
Date:   Tue, 14 Apr 2020 21:23:20 +0200

simplify terminal check

Diffstat:
Mscroll.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/scroll.c b/scroll.c @@ -402,10 +402,8 @@ main(int argc, char *argv[]) TAILQ_INIT(&head); - if (isatty(STDIN_FILENO) == 0) - die("stdin it not a tty"); - if (isatty(STDOUT_FILENO) == 0) - die("stdout it not a tty"); + if (isatty(STDIN_FILENO) == 0 || isatty(STDOUT_FILENO) == 0) + die("parent it not a tty"); /* save terminal settings for resetting after exit */ if (tcgetattr(STDIN_FILENO, &dfl) == -1)