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:
authorCorinna Vinschen <corinna@vinschen.de>2014-02-16 20:02:18 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-02-16 20:02:18 +0400
commit1e705e29329a0bca000bfb1f199042ffedfe477b (patch)
tree3c90a8f7f99a7b49276bb5b4dc4881c28652be11 /winsup/cygwin/miscfuncs.h
parentc18cbc8e6d1ddf3a91c960f7048d497c74c1d773 (diff)
* miscfuncs.h (NT_readline::close): New function to close handle.
(NT_readline::~NT_readline): Call close. * sec_auth.cc (verify_token): Use constructor to initialize tok_usersid. * security.h (cygsid::cygsid): Add copy constructor taking cygsid as source.
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 ();