Author: fireball
Date: Fri Jan  2 11:38:01 2009
New Revision: 38509
URL: 
http://svn.reactos.org/svn/reactos?rev=38509&view=rev
Log:
- Add Dmitry Gorbachev's hack for bug 3626 problem (cmd shell initially comes up in
permanent loop printing squares). Until a better solution is implemented...
See issue #3626 for more details.
Modified:
    trunk/reactos/dll/win32/kernel32/misc/nls.c
Modified: trunk/reactos/dll/win32/kernel32/misc/nls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/nl…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] Fri Jan  2 11:38:01 2009
@@ -284,6 +284,19 @@
                                      PAGE_READONLY,
                                      SEC_FILE,
                                      FileHandle);
+
+            /* HACK: Check if another process was faster
+             * and already created this section. See bug 3626 for details */
+            if (Status == STATUS_OBJECT_NAME_COLLISION)
+            {
+                /* Close the file then */
+                NtClose(FileHandle);
+
+                /* And open the section */
+                Status = NtOpenSection(&SectionHandle,
+                                       SECTION_MAP_READ,
+                                       &ObjectAttributes);
+            }
         }
     }
     RtlFreeUnicodeString(&UnicodeName);