From 80e7ad5be0e3adc93accbda9362336813667aa95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Sun, 26 Jul 1998 03:24:22 -0700
Subject: [PATCH] removed a bug which occurs when running with an old buggy
 pike

Rev: NT/tools/sprshd:1.10
---
 NT/tools/sprshd | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/NT/tools/sprshd b/NT/tools/sprshd
index fed528f8ca..9a8f9cc97f 100755
--- a/NT/tools/sprshd
+++ b/NT/tools/sprshd
@@ -5,9 +5,12 @@ inherit Stdio.Port;
 void monitor(object(Stdio.File) io, object proc)
 {
   proc->wait();
-  io->close("rw");
-  io->close();
-  destruct(io);
+  if(io)
+  {
+    io->close("rw");
+    io->close();
+    destruct(io);
+  }
 }
 
 void handle_incoming_connection(object(Stdio.File) io)
@@ -94,7 +97,7 @@ void handle_incoming_connection(object(Stdio.File) io)
 				   "cwd":dir,
 				   ]));
       };
-	destruct(p2);
+      destruct(p2);
       if(!err)
       {
 #if !constant(Stdio.PROP_IPC)
-- 
GitLab