Fix the spawn() functions. (Anthony Roach)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 30 Apr 2003 02:15:28 +0000 (02:15 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 30 Apr 2003 02:15:28 +0000 (02:15 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@664 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Action.py
src/engine/SCons/Platform/posix.py
src/engine/SCons/Platform/win32.py
test/builderrors.py

index c088d58f5fe299f1dc3f847b7c35650ef77d716d..04afab8fe132632e5a55b5570a0170efb5c86588 100644 (file)
@@ -88,6 +88,8 @@ RELEASE 0.14 - XXX
 
   - Support Import('*') to import everything that's been Export()ed.
 
+  - Fix an undefined exitvalmap on Win32 systems.
+
   From David Snopek:
 
   - Contribute the "Autoscons" code for Autoconf-like checking for
index 764d5279b25aacbe900889b90f5753f9e608a614..12608504861568e7adfa487eb1e346c06d23a192 100644 (file)
@@ -45,11 +45,6 @@ _null = _Null
 print_actions = 1;
 execute_actions = 1;
 
-exitvalmap = {
-    2 : 127,
-    13 : 126,
-}
-
 default_ENV = None
 
 def rfile(n):
index fd78de49cc175684002a889ed99a4238d32b398b..03c86984bc24872d57fe87ec114270c92620cd2f 100644 (file)
@@ -40,6 +40,11 @@ import sys
 
 import SCons.Util
 
+exitvalmap = {
+    2 : 127,
+    13 : 126,
+}
+
 def escape(arg):
     "escape shell special characters"
     slash = '\\'
index 4f7b05bdb55cedfbf3bd4f89d4b89dc5ea2a7aed..39c0ba8b54c72473ee26a7e9d27ea2a219e65220 100644 (file)
@@ -37,6 +37,7 @@ import os.path
 import string
 import sys
 import tempfile
+from SCons.Platform.posix import exitvalmap
 
 import SCons.Util
 
index 568ed0d76bc614a89a2a178099c8082587276cc4..4eb6bfad2e4907dd6ba26907688fd78a2655f894 100644 (file)
@@ -25,6 +25,7 @@
 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
 import os
+import string
 import sys
 import TestSCons
 
@@ -105,4 +106,18 @@ test.fail_test(test.read(['three', 'f1.out']) != "three/f1.in\n")
 test.fail_test(test.read(['three', 'f2.out']) != "three/f2.in\n")
 test.fail_test(os.path.exists(test.workpath('f3.out')))
 
+test.write('SConstruct', """
+env=Environment()
+if env['PLATFORM'] == 'posix':
+    from SCons.Platform.posix import fork_spawn
+    env['SPAWN'] = fork_spawn
+env['ENV']['PATH'] = ''
+env.Command(target='foo.out', source=[], action='not_a_program')
+""")
+
+test.run(status=2, stderr=None)
+err = test.stderr()
+test.fail_test(string.find(err, 'Exception') != -1 or \
+               string.find(err, 'Traceback') != -1)
+
 test.pass_test()