https://bugs.winehq.org/show_bug.cgi?id=49319
Bug ID: 49319 Summary: Services don't stop when the application stops (macOS only) Product: Wine Version: 5.7 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wineserver Assignee: wine-bugs@winehq.org Reporter: mterrisse@free.fr Distribution: ---
Hello,
Wine 5.7 x64, macOS Catalina 10.15.5
I have a prefix with an application installed and a Windows service registered. When I run the application, the service starts. But when I close the application, the service doesn't stop and the processes wineserver and wine64-preloader are still running. Even if I call wineboot -s, the service doesn't stop.
I tested with the same application and service on Ubuntu 20.04, and closing the application stops the service and all the processes exit.
So the problem looks specific to macOS.
Any idea to help understanding what is wrong?
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=49319
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|wineserver |-unknown
https://bugs.winehq.org/show_bug.cgi?id=49319
Michel Terrisse mterrisse@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- OS|Linux |Mac OS X Hardware|x86 |x86-64 Component|-unknown |wineserver
https://bugs.winehq.org/show_bug.cgi?id=49319
Michel Terrisse mterrisse@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mterrisse@free.fr
https://bugs.winehq.org/show_bug.cgi?id=49319
--- Comment #1 from Michel Terrisse mterrisse@free.fr --- I forgot to say that if I call net stop myservicename the service stops correctly. And if I close the application after that, all the processes exit including wineserver.
https://bugs.winehq.org/show_bug.cgi?id=49319
--- Comment #2 from Michel Terrisse mterrisse@free.fr --- Created attachment 67386 --> https://bugs.winehq.org/attachment.cgi?id=67386 A minimal Windows service
I attached MyService.exe Here are steps to reproduce the problem: - run wine64 cmd.exe - MyService.exe -Install - exit This closes the command line so the service should stop. But look at the running processes, wineserver and wine64-preloader are still running. - run wine64 cmd.exe - MyService -Stop (or net stop MyService) - exit This time the processes wineserver and wine64-preloader stop after a few seconds.
I hope this helps,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=49319
--- Comment #3 from Michel Terrisse mterrisse@free.fr --- I could find an old computer with macOS Sierra installed. I have installed XQuartz and wine 5.7 and I can reproduce the problem.
So it looks like the problem is present for macOS, all versions but not for Linux, all versions (as far as I know).
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=49319
--- Comment #4 from Michel Terrisse mterrisse@free.fr --- I could notice something important: the service is a console application and it calls AllocConsole() to be able to write to the console (this is not usefull here but for other applications that share the same code).
If I comment the call to AllocConsole() and all the lines that write to the console, the problem disappears.
So a correct title for this ticket could be: Services that call AllocConsole() don't stop when the application stops (macOS only)
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=49319
t.bussmann@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |t.bussmann@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=49319
--- Comment #5 from Ken Sharp imwellcushtymelike@gmail.com --- Does this still occur in Wine 9.7 or later?
If so, do you have an example application that can be tested?