Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
slapos
Commits
607ec2c7
Commit
607ec2c7
authored
Nov 13, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes found by pylint
parent
fe4ad9d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
slapos/recipe/librecipe/execute.py
slapos/recipe/librecipe/execute.py
+3
-2
No files found.
slapos/recipe/librecipe/execute.py
View file @
607ec2c7
...
@@ -67,8 +67,8 @@ def generic_exec(args):
...
@@ -67,8 +67,8 @@ def generic_exec(args):
os
.
execve
(
exec_list
[
0
],
exec_list
+
sys
.
argv
[
1
:],
exec_env
)
os
.
execve
(
exec_list
[
0
],
exec_list
+
sys
.
argv
[
1
:],
exec_env
)
def
sig_handler
(
sig
nal
,
frame
):
def
sig_handler
(
sig
,
frame
):
print
'Received signal %r, killing children and exiting'
%
sig
nal
print
'Received signal %r, killing children and exiting'
%
sig
if
child_pg
is
not
None
:
if
child_pg
is
not
None
:
os
.
killpg
(
child_pg
,
signal
.
SIGHUP
)
os
.
killpg
(
child_pg
,
signal
.
SIGHUP
)
os
.
killpg
(
child_pg
,
signal
.
SIGTERM
)
os
.
killpg
(
child_pg
,
signal
.
SIGTERM
)
...
@@ -81,6 +81,7 @@ signal.signal(signal.SIGTERM, sig_handler)
...
@@ -81,6 +81,7 @@ signal.signal(signal.SIGTERM, sig_handler)
def
execute_with_signal_translation
(
args
):
def
execute_with_signal_translation
(
args
):
"""Run process as children and translate from SIGTERM to another signal"""
"""Run process as children and translate from SIGTERM to another signal"""
global
child_pg
child
=
subprocess
.
Popen
(
args
,
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
child
=
subprocess
.
Popen
(
args
,
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
child_pg
=
child
.
pid
child_pg
=
child
.
pid
try
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment