From 226c5fb55869a5c0353a46da67999ee619add8c8 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 2 Jan 2009 17:38:01 +0000 Subject: [PATCH] - 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. svn path=/trunk/; revision=38509 --- reactos/dll/win32/kernel32/misc/nls.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reactos/dll/win32/kernel32/misc/nls.c b/reactos/dll/win32/kernel32/misc/nls.c index 86afb7ec0eb..86ee53cc0df 100644 --- a/reactos/dll/win32/kernel32/misc/nls.c +++ b/reactos/dll/win32/kernel32/misc/nls.c @@ -284,6 +284,19 @@ IntGetCodePageEntry(UINT CodePage) 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);