commit 8718290ad5b7f43ad577f5dbc1cf481228c311e5
Author: Jan Klemkow <[email protected]>
AuthorDate: Tue Apr 14 22:18:06 2020 +0200
Commit: Jan Klemkow <[email protected]>
CommitDate: Tue Apr 14 22:18:06 2020 +0200
fix broke build, add missing variable declaration
diff --git a/ptty.c b/ptty.c
index a5480fa..7d849fc 100644
--- 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
index f2e1fd3..c999971 100644
--- 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)