[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1
Марк Коренберг
report at bugs.python.org
Thu Mar 31 03:23:50 EDT 2022
Марк Коренберг <socketpair at gmail.com> added the comment:
Well.
1. We use Python as PID 1. In PID namespace.
2. Further investigation gave information that vfork()+pid=1 actually WORKS. The problem is connected with another weird thing in kernel (undocumented unshare() flags).
3. The logic to try fork() after vfork() has failed is NICE. Please merge. I would also write a message to stderr in case vfork() failed.
P.S. Program may or may not be static in order to work as PID=1.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47151>
_______________________________________
More information about the Python-bugs-list
mailing list