From e3f0926aefcc708a8bcc1a79a7751594c3af631e Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 16 Oct 2021 02:00:39 +0200 Subject: [PATCH] Allow the group host to terminate cleanly ...before terminating it forcefully. Not sure why this `TerminateProcess()` was here instead of in `group-host.cpp` in the first place. This way we don't have to duplicate any destructor behaviour. --- src/wine-host/bridges/group.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/wine-host/bridges/group.cpp b/src/wine-host/bridges/group.cpp index b9d76604..348f9814 100644 --- a/src/wine-host/bridges/group.cpp +++ b/src/wine-host/bridges/group.cpp @@ -334,15 +334,8 @@ void GroupBridge::maybe_schedule_shutdown( logger.log( "All plugins have exited, shutting down the group process"); - // main_context.stop(); - // FIXME: See the comment in `individual-host.cpp`. Because of that - // we also need to manually clean up the socket endpoint. - // ...was there a reason why we can't do this terminate at - // the end of `group-host.cpp`? I don't think there is. Then - // we don't need to duplicate this nasty destructor - // behaviour. - fs::remove(group_socket_endpoint.path()); - TerminateProcess(GetCurrentProcess(), 0); + // The whole process will exit in `group-host.cpp` because of this + main_context.stop(); } }); }