Commit 2829f693 authored by Łukasz Nowak's avatar Łukasz Nowak

- accept environment


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44076 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 93deae35
...@@ -4,10 +4,12 @@ import signal ...@@ -4,10 +4,12 @@ import signal
import subprocess import subprocess
import time import time
def execute(args): def execute(args, env=None):
"""Portable execution with process replacement""" """Portable execution with process replacement"""
if env is None:
env = {}
# Note: Candidate for slapos.lib.recipe # Note: Candidate for slapos.lib.recipe
os.execv(args[0], args) os.execve(args[0], args, env)
child_pg = None child_pg = None
def sig_handler(signal, frame): def sig_handler(signal, frame):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment