diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-01-31 14:18:49 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-01-31 14:18:49 +0000 |
commit | 8e87af7ed082bf06a30e226e6bc779c932db625a (patch) | |
tree | ef0ab0bf6cc1e64bd319bb7d7d6e5ce0410a4251 /winsup/cygwin/cygheap.h | |
parent | 3fbb5e3d800ab4fb8ec8330dc9be7d769859c95a (diff) | |
download | cygnal-8e87af7ed082bf06a30e226e6bc779c932db625a.tar.gz cygnal-8e87af7ed082bf06a30e226e6bc779c932db625a.tar.bz2 cygnal-8e87af7ed082bf06a30e226e6bc779c932db625a.zip |
* 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.h | 2 |
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 (); |