[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-31 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker ___

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-31 Thread miss-islington
miss-islington added the comment: New changeset 9ed179b07df6ce7432f972f5d069a7c8dee56e79 by Miss Islington (bot) in branch '3.10': bpo-47151: Fallback to fork when vfork fails in subprocess. (GH-32186) https://github.com/python/cpython/commit/9ed179b07df6ce7432f972f5d069a7c8dee56e79

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-31 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +30295 pull_request: https://github.com/python/cpython/pull/32219 ___ Python tracker

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 4a08c4c469d36f99d3a5e0f17ad82ab35dcf2835 by Gregory P. Smith in branch 'main': bpo-47151: Fallback to fork when vfork fails in subprocess. (GH-32186) https://github.com/python/cpython/commit/4a08c4c469d36f99d3a5e0f17ad82ab35dcf2835

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks. I had wondered if this was really a pid=1 restriction or not, but I could definitely imagine kernel scenarios where vfork is simply forbidden regardless. There are a variety of policy mechanisms in kernels, mainline Linux or not, that _could_ do

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-31 Thread Марк Коренберг
Марк Коренберг 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

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: > Any possibility that you can test the attached PR as pid 1? Python should be built as a static binary and can be used as the init process on the kernel command line, no? I'm not sure that "static binary" is a requirement, since I'm commonly using

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: Any possibility that you can test the attached PR as pid 1? -- ___ Python tracker ___ ___

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-29 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +30263 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32186 ___ Python tracker

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-29 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +Extension Modules -Library (Lib) stage: -> needs patch title: vfork() returns EINVAL if PID=1 -> subprocess fails when used as init, vfork() returns EINVAL if PID=1 type: -> behavior ___ Python tracker