diff options
author | Brian Paul <brianp@vmware.com> | 2009-07-17 22:00:47 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-07-17 22:00:47 -0600 |
commit | b96ae1b2c463d6d99ee0418083ef68f4027b7cd7 (patch) | |
tree | f34f89c267b940eb7408475bd0c2ff57c7fbe992 /scons | |
parent | f81f57e25db18b1c69f2f8076380603340fa2cda (diff) | |
parent | cd10996d4f517c69e306eaf6dfb0654432651b3a (diff) |
Merge branch 'mesa_7_5_branch'
Conflicts:
Makefile
progs/glsl/multitex.c
src/mesa/main/enums.c
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
Diffstat (limited to 'scons')
-rw-r--r-- | scons/fixes.py | 27 | ||||
-rw-r--r-- | scons/gallium.py | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/scons/fixes.py b/scons/fixes.py new file mode 100644 index 0000000000..714cccf61d --- /dev/null +++ b/scons/fixes.py @@ -0,0 +1,27 @@ +import sys + +# Monkey patch os.spawnve on windows to become thread safe +if sys.platform == 'win32': + import os + import threading + from os import spawnve as old_spawnve + + spawn_lock = threading.Lock() + + def new_spawnve(mode, file, args, env): + spawn_lock.acquire() + try: + if mode == os.P_WAIT: + ret = old_spawnve(os.P_NOWAIT, file, args, env) + else: + ret = old_spawnve(mode, file, args, env) + finally: + spawn_lock.release() + if mode == os.P_WAIT: + pid, status = os.waitpid(ret, 0) + ret = status >> 8 + return ret + + os.spawnve = new_spawnve + + diff --git a/scons/gallium.py b/scons/gallium.py index 7be0a25004..e9e799dc78 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -38,6 +38,8 @@ import SCons.Action import SCons.Builder import SCons.Scanner +import fixes + def quietCommandLines(env): # Quiet command lines |