summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2020-06-02 13:13:42 +0200
committerDavid Lönnhager <david.l@mullvad.net>2020-06-04 14:48:25 +0200
commit9cb04a15b67ce18ee2ab70431e013a3ab662e93b (patch)
tree0e74a5e6ec05cf74ec96de5aef43d6f8c52268da
parent1551534cdb1cada7579a1f2e281f2d9927474455 (diff)
downloadmullvadvpn-9cb04a15b67ce18ee2ab70431e013a3ab662e93b.tar.xz
mullvadvpn-9cb04a15b67ce18ee2ab70431e013a3ab662e93b.zip
Use unit type constructor for PidManager
-rw-r--r--talpid-core/src/split_tunnel/linux.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/talpid-core/src/split_tunnel/linux.rs b/talpid-core/src/split_tunnel/linux.rs
index 1f54b1b405..57cfd419d7 100644
--- a/talpid-core/src/split_tunnel/linux.rs
+++ b/talpid-core/src/split_tunnel/linux.rs
@@ -44,13 +44,13 @@ pub enum Error {
}
/// Manages PIDs to exclude from the tunnel.
-pub struct PidManager;
+pub struct PidManager(());
impl PidManager {
/// Create object to manage split-tunnel PIDs.
pub fn new() -> Result<PidManager, Error> {
Self::create_cgroup()?;
- Ok(PidManager {})
+ Ok(PidManager(()))
}
/// Set up cgroup used to track PIDs for split tunneling.
@@ -127,8 +127,6 @@ impl PidManager {
/// Return a list of PIDs that are excluded from the tunnel.
pub fn list(&self) -> Result<Vec<i32>, Error> {
- // TODO: manage child PIDs somehow?
-
let exclusions_path = Path::new(NETCLS_DIR)
.join(SPLIT_TUNNEL_CGROUP_NAME)
.join("cgroup.procs");