From fb24935605abe783eb9d17091311836b8cd2bc54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Thu, 27 Jan 2000 15:06:02 -0800
Subject: [PATCH] some bugfixes..

Rev: NT/tools/lib.pike:1.8
---
 NT/tools/lib.pike | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/NT/tools/lib.pike b/NT/tools/lib.pike
index 238b0c5cc7..ae47ec0846 100644
--- a/NT/tools/lib.pike
+++ b/NT/tools/lib.pike
@@ -84,14 +84,19 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent)
       for(int e=0;e<sizeof(cmd);e++)
 	f->write(sprintf("%4c%s",strlen(cmd[e]),cmd[e]));
 
-      if(f->proxy)
-	f->proxy(Stdio.File("stdin"));
-      else
+//      if(f->proxy)
+//	f->proxy(Stdio.File("stdin"));
+//      else
+//      werror("FNORD\n");
 	thread_create(lambda(object f)
 		      {
 			object stdin=Stdio.File("stdin");
 			while(string s=stdin->read(1000,1))
+			{
+			  if(!strlen(s)) break;
 			  f->write(s);
+			}
+			f->close("w");
 		      },f);
 
       while(1)
@@ -107,7 +112,8 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent)
       if(filter) filter(ret);
       sscanf(f->read(4),"%4c",int code);
       f->close("r");
-      f->close("w");
+//      f->close("w");
+//      werror("Closing stdout.\n");
       destruct(f);
       return code;
   }
-- 
GitLab