mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-03 21:10:25 +08:00
f7a77d0146
Previously, shared names in the console were created using get_minor(). However, get_minor() was not unique to the console across sessions. This is because EnumWindows(), which is used to look for console windows, cannot enumerate windows across sessions. This causes conflict on the shared names between sessions (e.g. sessions of different users, different services, a service and a user session, etc.). With this patch, GetConsoleWindow() is used instead of get_minor(). GetConsoleWindow() has been used for the name of shared memory, which should be unique to each console. Addresses: https://cygwin.com/pipermail/cygwin/2024-April/255893.html Fixes: ff4440fcf768 ("Cygwin: console: Introduce new thread which handles input signal."); Reported-by: Johannes Khoshnazar-Thoma <johannes@johannesthoma.com> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>