mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
build: set PWD in the subprocess preexec hook
(Bitbake rev: efa5485c8f9d488ba058c40734cc55296d3de6eb) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
2b7c2a8420
commit
e05d6fa927
@@ -1,14 +1,15 @@
|
|||||||
import subprocess
|
import os
|
||||||
import signal
|
|
||||||
import logging
|
import logging
|
||||||
|
import signal
|
||||||
|
import subprocess
|
||||||
|
|
||||||
logger = logging.getLogger('BitBake.Process')
|
logger = logging.getLogger('BitBake.Process')
|
||||||
|
|
||||||
def subprocess_setup():
|
def subprocess_setup():
|
||||||
# Python installs a SIGPIPE handler by default. This is usually not what
|
# Python installs a SIGPIPE handler by default. This is usually not what
|
||||||
# non-Python subprocesses expect.
|
# non-Python subprocesses expect.
|
||||||
print('in preexec hook')
|
|
||||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||||
|
os.environ['PWD'] = os.getcwd()
|
||||||
|
|
||||||
class CmdError(RuntimeError):
|
class CmdError(RuntimeError):
|
||||||
def __init__(self, command):
|
def __init__(self, command):
|
||||||
|
|||||||
Reference in New Issue
Block a user