|
From: <qh...@us...> - 2010-02-02 08:42:54
|
Revision: 1834
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1834&view=rev
Author: qhuang8
Date: 2010-02-02 08:42:48 +0000 (Tue, 02 Feb 2010)
Log Message:
-----------
Rollback to BaseTools revision 1799. The patch tries to use Win32 platform specific method to solve multi-thread build issue. We might need complete solution after more detailed investigation.
Revision Links:
--------------
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1799&view=rev
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/build.py
Modified: trunk/BaseTools/Source/Python/build/build.py
===================================================================
--- trunk/BaseTools/Source/Python/build/build.py 2010-02-02 06:44:31 UTC (rev 1833)
+++ trunk/BaseTools/Source/Python/build/build.py 2010-02-02 08:42:48 UTC (rev 1834)
@@ -22,10 +22,6 @@
import time
import platform
import traceback
-import types
-if sys.platform == "win32":
- import subprocess
- from _subprocess import CreateProcess
from threading import *
from optparse import OptionParser
@@ -217,43 +213,6 @@
if ExitFlag.isSet():
break
-class WinPopen(Popen):
- def _execute_child(self, args, executable, preexec_fn, close_fds,
- cwd, env, universal_newlines,
- startupinfo, creationflags, shell,
- p2cread, p2cwrite,
- c2pread, c2pwrite,
- errread, errwrite):
- """Execute program (MS Windows version)"""
-
- if not isinstance(args, types.StringTypes):
- args = subprocess.list2cmdline(args)
-
- # Start the process
- try:
- hp, ht, pid, tid = CreateProcess(executable, args,
- None, None,
- 0,
- creationflags,
- env,
- cwd,
- None)
- except IOError, e:
- raise WindowsError(*e.args)
-
- # Retain the process handle, but close the thread handle
- self._child_created = True
- self._handle = hp
- self.pid = pid
- ht.Close()
-
- if p2cread is not None:
- p2cread.Close()
- if c2pwrite is not None:
- c2pwrite.Close()
- if errwrite is not None:
- errwrite.Close()
-
## Launch an external program
#
# This method will call subprocess.Popen to execute an external program with
@@ -273,10 +232,7 @@
EndOfProcedure = None
try:
# launch the command
- if sys.platform == "win32":
- Proc = WinPopen(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1)
- else:
- Proc = Popen(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1)
+ Proc = Popen(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1)
# launch two threads to read the STDOUT and STDERR
EndOfProcedure = Event()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|