Skip to content
Snippets Groups Projects
Commit e16c5fe9 authored by cody burkard's avatar cody burkard
Browse files

attach to cgroup first, then mount namespace

parent 5fc3f57e
No related branches found
No related tags found
No related merge requests found
...@@ -653,8 +653,8 @@ def popen( self, *args, **kwargs ): ...@@ -653,8 +653,8 @@ def popen( self, *args, **kwargs ):
args: Popen() args, single list, or string args: Popen() args, single list, or string
kwargs: Popen() keyword args""" kwargs: Popen() keyword args"""
# Tell mnexec to execute command in our cgroup # Tell mnexec to execute command in our cgroup
mncmd = [ 'mnexec', '-da', str( self.pid ), mncmd = [ 'mnexec', '-g', self.name,
'-g', self.name ] '-da', str( self.pid ) ]
if self.sched == 'rt': if self.sched == 'rt':
mncmd += [ '-r', str( self.rtprio ) ] mncmd += [ '-r', str( self.rtprio ) ]
return Host.popen( self, *args, mncmd=mncmd, **kwargs ) return Host.popen( self, *args, mncmd=mncmd, **kwargs )
......
...@@ -40,5 +40,5 @@ if [ -d $rootdir -a -x $rootdir/bin/bash ]; then ...@@ -40,5 +40,5 @@ if [ -d $rootdir -a -x $rootdir/bin/bash ]; then
cmd="chroot $rootdir /bin/bash -c $cmd" cmd="chroot $rootdir /bin/bash -c $cmd"
fi fi
cmd="exec sudo mnexec -a $pid $cg $cmd" cmd="exec sudo mnexec $cg -a $pid $cmd"
eval $cmd eval $cmd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment