mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-03 10:17:58 -05:00
Stop the MCP stdio bridge leaving a quit OrcaSlicer as a zombie process
This commit is contained in:
1 parent
9f164e2a7b
commit
a07f29cf4f
1 file changed
+3
@@ -260,6 +260,9 @@ bool launch_app(const std::string& exe, const std::string& datadir)
|
||||
return false;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
}
|
||||
// The app stays this process's child, so reap it whenever it exits: an app quit while the bridge
|
||||
// still runs would otherwise stay a zombie until the bridge exits.
|
||||
std::thread([pid] { waitpid(pid, nullptr, 0); }).detach();
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user