diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-07-30 12:09:44 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-07-30 12:09:44 +0400 |
commit | 9e242ba4614aa94251e1ad9bf4dea1a1b3363443 (patch) | |
tree | 3920ce81da6a13a22ee128567ca74f0f294288c6 | |
parent | 69138a8bc5388617fc9b1b57945494fe153c3363 (diff) |
* fhandler_registry.cc (fhandler_registry::dup): Duplicate value_name.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_registry.cc | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index fb867945a..306ccabbe 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2011-07-30 Corinna Vinschen <corinna@vinschen.de> + + * fhandler_registry.cc (fhandler_registry::dup): Duplicate value_name. + 2011-07-29 Corinna Vinschen <corinna@vinschen.de> Throughout change "WinSock" to "Winsock" in comments. diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index ebd3cf551..500fb3a84 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -1028,12 +1028,17 @@ open_key (const char *name, REGSAM access, DWORD wow64, bool isValue) int fhandler_registry::dup (fhandler_base *child) { - int ret = fhandler_virtual::dup (child); + debug_printf ("here"); + fhandler_registry *fhs = (fhandler_registry *) child; + + int ret = fhandler_virtual::dup (fhs); /* Pseudo registry handles can't be duplicated using DuplicateHandle. Therefore those fhandlers are marked with the nohandle flag. This allows fhandler_base::dup to succeed as usual for nohandle fhandlers. Here we just have to fix up by copying the pseudo handle value. */ if ((HKEY) get_handle () >= HKEY_CLASSES_ROOT) - child->set_io_handle (get_handle ()); + fhs->set_io_handle (get_handle ()); + if (value_name) + fhs->value_name = cwcsdup (value_name); return ret; } |