Commits

Steven Knight  committed 10297c6

Fix the spawn() functions. (Anthony Roach)

  • Participants
  • Parent commits 24159e1

Comments (0)

Files changed (5)

File src/CHANGES.txt

 
   - 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

File src/engine/SCons/Action.py

 print_actions = 1;
 execute_actions = 1;
 
-exitvalmap = {
-    2 : 127,
-    13 : 126,
-}
-
 default_ENV = None
 
 def rfile(n):

File src/engine/SCons/Platform/posix.py

 
 import SCons.Util
 
+exitvalmap = {
+    2 : 127,
+    13 : 126,
+}
+
 def escape(arg):
     "escape shell special characters"
     slash = '\\'

File src/engine/SCons/Platform/win32.py

 import string
 import sys
 import tempfile
+from SCons.Platform.posix import exitvalmap
 
 import SCons.Util
 

File test/builderrors.py

 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
 import os
+import string
 import sys
 import TestSCons
 
 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()