diff options
| author | David Lönnhager <david.l@mullvad.net> | 2026-04-16 14:47:23 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2026-04-20 13:58:47 +0200 |
| commit | 0fb01dcdfe97646b30aad593be21a255f27574bc (patch) | |
| tree | 39bd7e01de51588363fc1fc2c1426b0e015f43fd | |
| parent | 23da003c9c0ebdac8b700200ecf98561f4958eb7 (diff) | |
| download | mullvadvpn-0fb01dcdfe97646b30aad593be21a255f27574bc.tar.xz mullvadvpn-0fb01dcdfe97646b30aad593be21a255f27574bc.zip | |
Fix 'mullvad split-tunnel clear' getting stuck
Reading from mullvad-exclude's `cgroup.procs` immediately after
moving a process to its parent causes it to be moved back to the
mullvad-exclude cgroup. This causes 'mullvad split-tunnel clear' to
never complete.
| -rw-r--r-- | talpid-core/src/split_tunnel/linux/mod.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/talpid-core/src/split_tunnel/linux/mod.rs b/talpid-core/src/split_tunnel/linux/mod.rs index 79df04fae6..47c9b702f7 100644 --- a/talpid-core/src/split_tunnel/linux/mod.rs +++ b/talpid-core/src/split_tunnel/linux/mod.rs @@ -218,13 +218,9 @@ impl Inner { /// Removes all PIDs from the Cgroup. fn clear(&mut self) -> Result<(), Error> { - let mut pids = self.list()?; - while !pids.is_empty() { - for pid in pids { - let pid = Pid::from_raw(pid); - self.remove(pid)?; - } - pids = self.list()?; + for pid in self.list()? { + let pid = Pid::from_raw(pid); + self.remove(pid)?; } Ok(()) } |
