Skip to content
Snippets Groups Projects
Commit e5a15ced authored by Bob Lantz's avatar Bob Lantz
Browse files

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
parent c771b2d7
No related branches found
No related tags found
No related merge requests found
......@@ -291,7 +291,7 @@ def popen( self, *args, **kwargs ):
kwargs: Popen() keyword args"""
defaults = { 'stdout': PIPE, 'stderr': PIPE,
'mncmd':
[ 'mnexec', '-a', str( self.pid ) ] }
[ 'mnexec', '-da', str( self.pid ) ] }
defaults.update( kwargs )
if len( args ) == 1:
if type( args[ 0 ] ) is list:
......@@ -605,7 +605,7 @@ def popen( self, *args, **kwargs ):
args: Popen() args, single list, or string
kwargs: Popen() keyword args"""
# Tell mnexec to execute command in our cgroup
mncmd = [ 'mnexec', '-a', str( self.pid ),
mncmd = [ 'mnexec', '-da', str( self.pid ),
'-g', self.name ]
if self.sched == 'rt':
mncmd += [ '-r', str( self.rtprio ) ]
......
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