We don't have to check for the cgroup namespace name because the
pid we are looking for is already in the list of the container owned by
lxc and retrieved from the abstract socket command name.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
my $container = '';
foreach ( @cgroup ) {
chomp;
- # find the container name
- if (m/[:,]ns[:,]/o) {
- # container name after :/
- s/.*:\///o;
- $container = $_;
- }
+ # find the container name after :/
+ s/.*:\///o;
+ $container = $_;
}
return $container;
}