Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/miscfuncs.h')
-rw-r--r--winsup/cygwin/miscfuncs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/miscfuncs.h
index 66dfc900a..e42940c1a 100644
--- a/winsup/cygwin/miscfuncs.h
+++ b/winsup/cygwin/miscfuncs.h
@@ -38,7 +38,8 @@ public:
NT_readline () : fh (NULL) {}
bool init (POBJECT_ATTRIBUTES attr, char *buf, ULONG buflen);
PCHAR gets ();
- ~NT_readline () { if (fh) NtClose (fh); }
+ void close () { if (fh) NtClose (fh); fh = NULL; }
+ ~NT_readline () { close (); }
};
extern "C" void yield ();