diff options
author | Robert S. French <rfrench@mit.edu> | 1987-06-10 09:27:01 +0000 |
---|---|---|
committer | Robert S. French <rfrench@mit.edu> | 1987-06-10 09:27:01 +0000 |
commit | d5986c2929235cd0265378f8c23a259f9b621298 (patch) | |
tree | 48ab2452d507917b073716e83f440fb017b2237d /lib/ZClosePort.c | |
parent | 2e57c91dfdf12a2aa898d643ab019d6fc6cd8c65 (diff) |
Fixed closing problem with ZSetFD
Diffstat (limited to 'lib/ZClosePort.c')
-rw-r--r-- | lib/ZClosePort.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ZClosePort.c b/lib/ZClosePort.c index 0853d00..27e7e18 100644 --- a/lib/ZClosePort.c +++ b/lib/ZClosePort.c @@ -18,10 +18,11 @@ Code_t ZClosePort() { - if (__Zephyr_fd >= 0) + if (__Zephyr_fd >= 0 && __Zephyr_open) close(__Zephyr_fd); __Zephyr_fd = -1; - + __Zephyr_open = 0; + return (ZERR_NONE); } |