[project @ 1999-06-28 08:27:25 by simonmar]
authorsimonmar <unknown>
Mon, 28 Jun 1999 08:27:25 +0000 (08:27 +0000)
committersimonmar <unknown>
Mon, 28 Jun 1999 08:27:25 +0000 (08:27 +0000)
Don't attempt to close stdin or stdout.  From Kevin Atkinson
<kevinatk@home.com>.

ghc/utils/unlit/unlit.c

index b15e568..27688c7 100644 (file)
@@ -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);
 }