Răsfoiți Sursa

ptty: write input from child to stdout

Jan Klemkow 5 ani în urmă
părinte
comite
db05bd2318
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      ptty.c

+ 2 - 1
ptty.c

@@ -96,7 +96,8 @@ main(int argc, char *argv[])
 		die("close:");
 
 	char buf[BUFSIZ];
-	while (fgets(buf, sizeof buf, fh) != NULL);
+	while (fgets(buf, sizeof buf, fh) != NULL)
+		fputs(buf, stdout);
 
 	int status;
 	waitpid(pid, &status, 0);