[pypy-dev] os.wait() implementation

Dan Roberts ademan555 at gmail.com
Sat Nov 21 21:00:38 CET 2009


Hi Everyone,
   I now have an application-level implementation of os.wait() complete.
It's built on top of os.waitpid(), but according to the documentation
I've found, the behavior should be the same.  My test might be a bit
objectionable as well, but I wanted to use a non-zero return value.  I
also modified test_popen() as it wasn't waiting for its children, and
broke my test_os_wait(), since it was waiting for the child processes
created by test_popen().

    In the future it would be desirable to implement os.wait() in terms
of the c wait() function in ll_os.py but currently (at least on Ubuntu
9.10) the c wait() function takes a pointer to a transparent struct,
rather than an int, and that seems to prevent my interpreter level
version from being built.

  I've attached both versions, but the interpreter level version will
not translate.

cheers,
Dan

P.S. This is my first patch, so it's probably worth giving it at least a
once over...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pypy_os_wait_interplevel.diff
Type: text/x-patch
Size: 3494 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20091121/b6d11556/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pypy_os_wait_test_fixed.diff
Type: text/x-patch
Size: 2298 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20091121/b6d11556/attachment-0001.bin>


More information about the Pypy-dev mailing list