[Python-Dev] Using Python on a fork-less POSIX-like OS
Hello Python list, I intend to cross-compile Python v3.6.6 to Threos ( https://threos.io ) operating system. Threos is supports a quite large set from POSIX and C89/C99. Unfortunately, Threos lacks fork(2), but provides posix_spawn(3) instead. I already made some local changes in posixmodule.c to compile due to some features are detected as present but actually not supported, like HAVE_FORK -- I blame autotools for this :-). I don't know, however, whether the Python shall cross-compile without issues. My question is that the _posixsubprocess.c can be prepared to use posix_spawn(3) instead of fork(2)? Maybe the UNIX/Linux version can also benefit from it, see: https://salsa.debian.org/ruby-team/ruby-posix-spawn Best regards, Aron ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Using Python on a fork-less POSIX-like OS
On 07/29/2018 06:02 PM, Berker Peksağ wrote: There is an open issue to add os.posix_spawn() at https://bugs.python.org/issue20104 Seems promising, but 3.7 does not support it. And I don't see whether Python will work without fork(). - bpo-20104: Expose posix_spawn as a low level API in the os module. (removed before 3.7.0rc1) --Berker Aron ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Using Python on a fork-less POSIX-like OS
On 07/30/2018 10:23 AM, Victor Stinner wrote: Python 3.8 will support os.posix_spawn(). I would like to see it used whenever possible instead of fork+exec, since it's faster and it can be safer on some platforms. Pablo Salgado is your guy for that. Victor Awesome! Will this backported to 2.7? Or people should forget 2.7? Aron ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com