Change popen() to detach from terminal/process group.
This may or may not be the right thing to do - an alternative would be to ignore SIGINT, but that would make the popen() job unkillable by normal means! So we'll try this and see how well it works. Fixes #124
This commit is contained in:
+2
-2
@@ -291,7 +291,7 @@ class Node( object ):
|
|||||||
kwargs: Popen() keyword args"""
|
kwargs: Popen() keyword args"""
|
||||||
defaults = { 'stdout': PIPE, 'stderr': PIPE,
|
defaults = { 'stdout': PIPE, 'stderr': PIPE,
|
||||||
'mncmd':
|
'mncmd':
|
||||||
[ 'mnexec', '-a', str( self.pid ) ] }
|
[ 'mnexec', '-da', str( self.pid ) ] }
|
||||||
defaults.update( kwargs )
|
defaults.update( kwargs )
|
||||||
if len( args ) == 1:
|
if len( args ) == 1:
|
||||||
if type( args[ 0 ] ) is list:
|
if type( args[ 0 ] ) is list:
|
||||||
@@ -605,7 +605,7 @@ class CPULimitedHost( Host ):
|
|||||||
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', '-a', str( self.pid ),
|
mncmd = [ 'mnexec', '-da', str( self.pid ),
|
||||||
'-g', self.name ]
|
'-g', self.name ]
|
||||||
if self.sched == 'rt':
|
if self.sched == 'rt':
|
||||||
mncmd += [ '-r', str( self.rtprio ) ]
|
mncmd += [ '-r', str( self.rtprio ) ]
|
||||||
|
|||||||
Reference in New Issue
Block a user