Author: Amaury Forgeot d'Arc <[email protected]>
Branch: missing-os-functions
Changeset: r62193:0cc72ca23531
Date: 2013-03-07 00:37 +0100
http://bitbucket.org/pypy/pypy/changeset/0cc72ca23531/

Log:    Fix conditional definition of wait3 and wait4

diff --git a/pypy/module/posix/__init__.py b/pypy/module/posix/__init__.py
--- a/pypy/module/posix/__init__.py
+++ b/pypy/module/posix/__init__.py
@@ -48,12 +48,10 @@
                 'popen3' : 'app_posix.popen3',
                 'popen4' : 'app_posix.popen4',
                 })
-    if hasattr(posix, 'wait'):
-        appleveldefs['wait'] = 'app_posix.wait'
-    if hasattr(posix, 'wait3'):
-        appleveldefs['wait3'] = 'app_posix.wait3'
-    if hasattr(posix, 'wait4'):
-        appleveldefs['wait4'] = 'app_posix.wait4'
+    for name in '''wait wait3 wait4'''.split():
+        symbol = 'HAVE_' + name.upper()
+        if getattr(rposix, symbol):
+            appleveldefs[name] = 'app_posix.%s' % (name,)
         
     # Functions implemented on all platforms
     interpleveldefs = {
@@ -107,7 +105,7 @@
             getsid getuid geteuid getgid getegid getpgrp getpgid
             setsid setuid seteuid setgid setegid setpgrp setpgid
             getppid getgroups setreuid setregid
-            wait wait3 wait4 killpg waitpid
+            killpg waitpid
             '''.split():
         symbol = 'HAVE_' + name.upper()
         if getattr(rposix, symbol):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to