From 8ff6657f140ad70ae232cfc443a39befc107fb9f Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Mon, 28 Jun 1999 08:27:25 +0000
Subject: [PATCH] [project @ 1999-06-28 08:27:25 by simonmar] Don't attempt to
 close stdin or stdout.  From Kevin Atkinson <kevinatk@home.com>.

---
 ghc/utils/unlit/unlit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ghc/utils/unlit/unlit.c b/ghc/utils/unlit/unlit.c
index b15e56829b8a..27688c71d9bc 100644
--- a/ghc/utils/unlit/unlit.c
+++ b/ghc/utils/unlit/unlit.c
@@ -338,8 +338,8 @@ char **argv; {
 
     unlit(file, istream, ostream);
 
-    fclose(istream);
-    fclose(ostream);
+    if (istream != stdin)  fclose(istream);
+    if (ostream != stdout) fclose(ostream);
 
     exit(errors==0 ? 0 : 1);
 }
-- 
GitLab