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>2008-01-31 17:18:49 +0300
committerCorinna Vinschen <corinna@vinschen.de>2008-01-31 17:18:49 +0300
commit8e87af7ed082bf06a30e226e6bc779c932db625a (patch)
treeef0ab0bf6cc1e64bd319bb7d7d6e5ce0410a4251 /winsup/cygwin/cygheap.h
parent3fbb5e3d800ab4fb8ec8330dc9be7d769859c95a (diff)
* cygheap.h (struct cwdstuff): Add dir member to store cwd handle.
(cwdstuff::get_handle): New method. * path.cc (cwdstuff::set): When doit is true, always try to get directory handle. Fail if duplicating handle fails. Store handle in dir. Fix potential SEGV when setting drive_length.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index f51b9a1e9..7d232584a 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -223,9 +223,11 @@ struct cwdstuff
{
char *posix;
UNICODE_STRING win32;
+ HANDLE dir;
DWORD drive_length;
static muto cwd_lock;
char *get (char *, int = 1, int = 0, unsigned = CYG_MAX_PATH);
+ HANDLE get_handle () { return dir; }
DWORD get_drive (char * dst)
{
cwd_lock.acquire ();