scroll

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

commit 8718290ad5b7f43ad577f5dbc1cf481228c311e5
parent a0cb60891a7420ab2256f238498317569879d4d3
Author: Jan Klemkow <j.klemkow@wemelug.de>
Date:   Tue, 14 Apr 2020 22:18:06 +0200

fix broke build, add missing variable declaration

Diffstat:
Mptty.c | 7+++++--
Mscroll.c | 1+
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ptty.c b/ptty.c @@ -87,8 +87,11 @@ main(int argc, char *argv[]) if (fh == NULL) die("fdopen"); - char buf[BUFSIZ]; - while (fgets(buf, sizeof buf, fh) != NULL); + if (close(mfd) == -1) + die("close:"); + +// char buf[BUFSIZ]; +// while (fgets(buf, sizeof buf, fh) != NULL); int status; waitpid(pid, &status, 0); diff --git a/scroll.c b/scroll.c @@ -543,6 +543,7 @@ main(int argc, char *argv[]) if (close(mfd) == -1) die("close:"); + pid_t pid; int status; while ((pid = waitpid(-1, &status, WNOHANG)) > 0) if (pid != child)