Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/scons/scons-local/SCons/Platform/posix.py

Issue 17024: Update to SCons 1.2.0. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 """SCons.Platform.posix 1 """SCons.Platform.posix
2 2
3 Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems. 3 Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems.
4 4
5 There normally shouldn't be any need to import this module directly. It 5 There normally shouldn't be any need to import this module directly. It
6 will usually be imported through the generic SCons.Platform.Platform() 6 will usually be imported through the generic SCons.Platform.Platform()
7 selection method. 7 selection method.
8 """ 8 """
9 9
10 # 10 #
(...skipping 12 matching lines...) Expand all
23 # 23 #
24 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 24 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
25 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 25 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
26 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 # 31 #
32 32
33 __revision__ = "src/engine/SCons/Platform/posix.py 3603 2008/10/10 05:46:45 scon s" 33 __revision__ = "src/engine/SCons/Platform/posix.py 3842 2008/12/20 22:59:52 scon s"
34 34
35 import errno 35 import errno
36 import os 36 import os
37 import os.path 37 import os.path
38 import popen2
39 import string 38 import string
39 import subprocess
40 import sys 40 import sys
41 import select 41 import select
42 42
43 import SCons.Util 43 import SCons.Util
44 from SCons.Platform import TempFileMunge 44 from SCons.Platform import TempFileMunge
45 45
46 exitvalmap = { 46 exitvalmap = {
47 2 : 127, 47 2 : 127,
48 13 : 126, 48 13 : 126,
49 } 49 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 #sys.__stderr__.write( "stderr_eof=1\n" ) 124 #sys.__stderr__.write( "stderr_eof=1\n" )
125 stderr_eof = 1 125 stderr_eof = 1
126 else: 126 else:
127 #sys.__stderr__.write( "str(stderr) = %s\n" % str ) 127 #sys.__stderr__.write( "str(stderr) = %s\n" % str )
128 stderr.write(str) 128 stderr.write(str)
129 except select.error, (_errno, _strerror): 129 except select.error, (_errno, _strerror):
130 if _errno != errno.EINTR: 130 if _errno != errno.EINTR:
131 raise 131 raise
132 132
133 def exec_popen3(l, env, stdout, stderr): 133 def exec_popen3(l, env, stdout, stderr):
134 proc = popen2.Popen3(string.join(l), 1) 134 proc = subprocess.Popen(string.join(l),
135 process_cmd_output(proc.fromchild, proc.childerr, stdout, stderr) 135 stdout=stdout,
136 stderr=stderr,
137 shell=True)
136 stat = proc.wait() 138 stat = proc.wait()
137 if stat & 0xff: 139 if stat & 0xff:
138 return stat | 0x80 140 return stat | 0x80
139 return stat >> 8 141 return stat >> 8
140 142
141 def exec_piped_fork(l, env, stdout, stderr): 143 def exec_piped_fork(l, env, stdout, stderr):
142 # spawn using fork / exec and providing a pipe for the command's 144 # spawn using fork / exec and providing a pipe for the command's
143 # stdout / stderr stream 145 # stdout / stderr stream
144 if stdout != stderr: 146 if stdout != stderr:
145 (rFdOut, wFdOut) = os.pipe() 147 (rFdOut, wFdOut) = os.pipe()
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 env['SHELL'] = 'sh' 249 env['SHELL'] = 'sh'
248 env['ESCAPE'] = escape 250 env['ESCAPE'] = escape
249 env['TEMPFILE'] = TempFileMunge 251 env['TEMPFILE'] = TempFileMunge
250 env['TEMPFILEPREFIX'] = '@' 252 env['TEMPFILEPREFIX'] = '@'
251 #Based on LINUX: ARG_MAX=ARG_MAX=131072 - 3000 for environment expansion 253 #Based on LINUX: ARG_MAX=ARG_MAX=131072 - 3000 for environment expansion
252 #Note: specific platforms might rise or lower this value 254 #Note: specific platforms might rise or lower this value
253 env['MAXLINELENGTH'] = 128072 255 env['MAXLINELENGTH'] = 128072
254 256
255 # This platform supports RPATH specifications. 257 # This platform supports RPATH specifications.
256 env['__RPATH'] = '$_RPATH' 258 env['__RPATH'] = '$_RPATH'
OLDNEW
« no previous file with comments | « third_party/scons/scons-local/SCons/Platform/os2.py ('k') | third_party/scons/scons-local/SCons/Platform/sunos.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698