From 9d306ad53a19fb79a92cf8c86c26651833190c44 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 18 May 2017 17:14:30 -0700 Subject: [PATCH] Allow passing mncmd to CPULimitedHost.popen() This is not not really intended as an external API (and it currently isn't documented) but this makes it consistent. Fixes #743 --- mininet/node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mininet/node.py b/mininet/node.py index b0ad36d..c8d34e4 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -702,8 +702,8 @@ class CPULimitedHost( Host ): args: Popen() args, single list, or string kwargs: Popen() keyword args""" # Tell mnexec to execute command in our cgroup - mncmd = [ 'mnexec', '-g', self.name, - '-da', str( self.pid ) ] + mncmd = kwargs.pop( 'mncmd', [ 'mnexec', '-g', self.name, + '-da', str( self.pid ) ] ) # if our cgroup is not given any cpu time, # we cannot assign the RR Scheduler. if self.sched == 'rt':