https://bugs.winehq.org/show_bug.cgi?id=41799
Bug ID: 41799 Summary: winspool.drv: race can cause WINSPOOL_LoadSystemPrinters to fail Product: Wine Version: 1.9.23 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: awilfox@adelielinux.org Distribution: ---
Created attachment 56232 --> https://bugs.winehq.org/attachment.cgi?id=56232 winspool.drv: Clear last error when creating mutex
WINSPOOL_LoadSystemPrinters creates a unique mutex and then checks if GetLastError is ERROR_ALREADY_EXISTS. Running 1.9.23 with staging or unpatched, and current -HEAD, I'm seeing a race where sometimes a stale error is left and it returns ERROR_ALREADY_EXISTS due to another component. This causes printing to always fail on my machine, since CUPS_LoadPrinters is never called and therefore no printers exist.
This one-line patch has allowed printing to work on my system and still guards against multiple initialisations.
https://bugs.winehq.org/show_bug.cgi?id=41799
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine.dev@web.de
https://bugs.winehq.org/show_bug.cgi?id=41799
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #1 from Austin English austinenglish@gmail.com --- FYI, patches are not picked up from bugzilla. Patches should be wine-patches@winehq.org. See https://wiki.winehq.org/SubmittingPatches
https://bugs.winehq.org/show_bug.cgi?id=41799
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #2 from winetest@luukku.com --- Also you need to use real name when submiting patches. Could you resend?