Return a Popen() object in node's namespace args: Popen() args, single list, or string kwargs: Popen() keyword args
( self, *args, **kwargs )
| 739 | return exitcode == 0 or ( 'no such file' in _err.lower() ) |
| 740 | |
| 741 | def popen( self, *args, **kwargs ): |
| 742 | """Return a Popen() object in node's namespace |
| 743 | args: Popen() args, single list, or string |
| 744 | kwargs: Popen() keyword args""" |
| 745 | # Tell mnexec to execute command in our cgroup |
| 746 | mncmd = kwargs.pop( 'mncmd', [ 'mnexec', '-g', self.name, |
| 747 | '-da', str( self.pid ) ] ) |
| 748 | # if our cgroup is not given any cpu time, |
| 749 | # we cannot assign the RR Scheduler. |
| 750 | if self.sched == 'rt': |
| 751 | if int( self.cgroupGet( 'rt_runtime_us', 'cpu' ) ) <= 0: |
| 752 | mncmd += [ '-r', str( self.rtprio ) ] |
| 753 | else: |
| 754 | debug( '*** error: not enough cpu time available for %s.' % |
| 755 | self.name, 'Using cfs scheduler for subprocess\n' ) |
| 756 | return Host.popen( self, *args, mncmd=mncmd, **kwargs ) |
| 757 | |
| 758 | def cleanup( self ): |
| 759 | "Clean up Node, then clean up our cgroup" |