Implement the Wine host process watchdog

This will shut down a bridge's sockets when the connected native host
process exits, to prevent dangling Wine processes.
This commit is contained in:
Robbert van der Helm
2021-05-01 17:54:22 +02:00
parent e912bdd302
commit 832089d4d1
8 changed files with 52 additions and 13 deletions
+5 -1
View File
@@ -207,6 +207,9 @@ class Vst3Bridge : public HostBridge {
* load.
* @param endpoint_base_dir The base directory used for the socket
* endpoints. See `Sockets` for more information.
* @param parent_pid The process ID of the native plugin host this bridge is
* supposed to communicate with. Used as part of our watchdog to prevent
* dangling Wine processes.
*
* @note The object has to be constructed from the same thread that calls
* `main_context.run()`.
@@ -216,7 +219,8 @@ class Vst3Bridge : public HostBridge {
*/
Vst3Bridge(MainContext& main_context,
std::string plugin_dll_path,
std::string endpoint_base_dir);
std::string endpoint_base_dir,
pid_t parent_pid);
/**
* For VST3 plugins we'll have to check for every object in