summaryrefslogtreecommitdiffstats
path: root/byterun/io.c
diff options
context:
space:
mode:
authorFrancois Rouaix <francois.rouaix@gmail.com>1996-11-28 18:02:50 +0000
committerFrancois Rouaix <francois.rouaix@gmail.com>1996-11-28 18:02:50 +0000
commit11ca74faad4f3c27e426ed38d0089563de4a8b46 (patch)
treefb7c646c10ff874c8a0c45dc3058ff05265ee7ad /byterun/io.c
parent6bf79ed32f546553774fecb8e59b03afb60d26f4 (diff)
Fixed close(-1)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1207 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/io.c')
-rw-r--r--byterun/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/byterun/io.c b/byterun/io.c
index 4148dfb89..ba3010d4b 100644
--- a/byterun/io.c
+++ b/byterun/io.c
@@ -51,7 +51,7 @@ static void finalize_channel(vchan)
value vchan;
{
struct channel * chan = (struct channel *) vchan;
- close(chan->fd);
+ if (chan->fd != -1) close(chan->fd);
}
struct channel * open_descr(fd)