[pypy-dev] setpgrp and getpgrp platform:errors

Da_Blitz pypy at pocketnix.org
Mon Jun 6 15:32:37 CEST 2011


Hi

below is a patch that removes these errors during translation or when using py.py

i am poking with things i do not fully understand here and would 
prefer it if someone told me i was an idiot and that args were passed 
to the functions for some reason (eg compatibility with the BSD's). 
according to the man page on linux (debian) there are 2 calling 
conventions, the System V and the BSD the os.setpgrp and os.getpgrp do 
not appear to take arguments and so i just chopped them off and "Magic 
Happened" (tm)


feel free to point out somthing i missed/broke/caused meltdown on

-------------------------
diff -r b590cf6de419 pypy/rpython/module/ll_os.py
--- a/pypy/rpython/module/ll_os.py      Fri Apr 29 17:42:40 2011 +0200
+++ b/pypy/rpython/module/ll_os.py      Mon Jun 06 23:26:35 2011 +1000
@@ -191,13 +191,13 @@

         if hasattr(os, 'getpgrp'):
             self.GETPGRP_HAVE_ARG = platform.checkcompiles(
-                "getpgrp(0)",
+                "getpgrp()",
                 '#include <unistd.h>',
                 [])

         if hasattr(os, 'setpgrp'):
             self.SETPGRP_HAVE_ARG = platform.checkcompiles(
-                "setpgrp(0,0)",
+                "setpgrp()",
                 '#include <unistd.h>',
                 [])

(


More information about the pypy-dev mailing list