mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 13:40:05 +02:00
Fix missing detached flag in Process::Handle moves
This is why C++'s move semantics are footguns. The result of this was that grouped plugins would no longer be detached when they were moved (in this case, into the group connect handler closure). Which in turn caused those plugins to block until the plugin host process terminated, which thus ended up blocking the host indefinitely.
This commit is contained in:
@@ -194,13 +194,15 @@ Process::Handle::~Handle() {
|
||||
}
|
||||
}
|
||||
|
||||
Process::Handle::Handle(Handle&& o) noexcept : pid_(o.pid_) {
|
||||
Process::Handle::Handle(Handle&& o) noexcept
|
||||
: detached_(o.detached_), pid_(o.pid_) {
|
||||
o.detached_ = true;
|
||||
}
|
||||
|
||||
Process::Handle& Process::Handle::operator=(Handle&& o) noexcept {
|
||||
o.detached_ = true;
|
||||
|
||||
detached_ = o.detached_;
|
||||
pid_ = o.pid_;
|
||||
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user