On Wed Nov 29 01:00:46 2023 +0000, Brendan Shanks wrote:
`fork()` is particularly slow on macOS, this is negligible for a single prefix but adds up for an app like CrossOver which is managing many bottles and starting them to retrieve settings, etc. Also I hadn't considered it, but Chip's point is a good one when Wine is running inside a Mac Cocoa app (like CrossOver's launchers). The error handling and many calls to `posix_spawn()` do complicate the code, I'll see if it would be simpler to pre-generate the possible `wineserver` paths and then loop through them until one succeeds.
I pushed a new version which factors out the generation of possible paths to a function, this allows for just a single call to `execv`/`posix_spawn`.