diff options
author | marha <marha@users.sourceforge.net> | 2012-06-08 09:33:13 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-08 09:33:13 +0200 |
commit | 990bc3f015a4f8fce2eb918375defcd44980a845 (patch) | |
tree | 8e8301f19482b52cc00bd95b4593522cc93267af /mesalib/scons/fixes.py | |
parent | 1af6fc1b5d93e54d6674de8b5870448b29f139a7 (diff) | |
download | vcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.tar.gz vcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.tar.bz2 vcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.zip |
Used synchronise script to update files
Diffstat (limited to 'mesalib/scons/fixes.py')
-rw-r--r-- | mesalib/scons/fixes.py | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/mesalib/scons/fixes.py b/mesalib/scons/fixes.py index 5946106ab..714cccf61 100644 --- a/mesalib/scons/fixes.py +++ b/mesalib/scons/fixes.py @@ -1,27 +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
-
-
+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 + + |