@staticmethod
def __infinite_loop(config, sleep_time=1):
- cmd = ["/usr/bin/perl",
- "-e",
+ cmd = ['/usr/bin/perl',
+ '-e',
"'while(1){{sleep({})}};'".format(sleep_time)
]
@staticmethod
def __cgexec_infinite_loop(config, controller, cgname, sleep_time=1,
ignore_systemd=False, replace_idle=False):
- cmd = ["/usr/bin/perl",
- "-e",
+ cmd = ['/usr/bin/perl',
+ '-e',
"'while(1){{sleep({})}};'".format(sleep_time)
]
# get the PID of the newly spawned infinite loop
cmd = (
"ps x | grep perl | grep 'sleep({})' | awk '{{print $1}}'"
- "".format(sleep_time)
+ ''.format(sleep_time)
)
if config.args.container: