Commits

Amaury Forgeot d'Arc committed 0cc72ca

Fix conditional definition of wait3 and wait4

  • Participants
  • Parent commits 873c7be
  • Branches missing-os-functions

Comments (0)

Files changed (1)

File pypy/module/posix/__init__.py

                 '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 = {
             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):