Skip to content

bpo-35823: Allow setsid() after vfork() on Linux. - #22945

Merged
gpshead merged 1 commit into
python:masterfrom
gpshead:vfork-allow-setsid
Oct 24, 2020
Merged

gpshead merged 1 commit into
python:masterfrom
gpshead:vfork-allow-setsid

Conversation

@gpshead

@gpshead gpshead commented Oct 24, 2020 •

Copy link
Copy Markdown
Member

It should just be a syscall updating a couple of fields in the kernel side
process info. Confirming, in glibc is appears to be a shim for the setsid
syscall (based on not finding any code implementing anything special for it)
and in uclibc (much easier to read) it is clearly just a setsid syscall shim.

A breadcrumb suggesting that it is not allowed on Darwin/macOS comes from
a commit in emacs: https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00297.html
but I don't have a way to verify if that is true or not.
As we are not supporting vfork on macOS today I just left a note in a comment.

https://bugs.python.org/issue35823

It should just be a syscall updating a couple of fields in the kernel side
process info.  Confirming, in glibc is appears to be a shim for the setsid
syscall (based on not finding any code implementing anything special for it)
and in uclibc (*much* easier to read) it is clearly just a setsid syscall shim.

A breadcrumb _suggesting_ that it is not allowed on Darwin/macOS comes from
a commit in emacs: https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00297.html
but I don't have a way to verify if that is true or not.
As we are not supporting vfork on macOS today I just left a note in a comment.
@gpshead
gpshead merged commit be3c3a0 into python:master Oct 24, 2020
@gpshead
gpshead deleted the vfork-allow-setsid branch October 24, 2020 19:07
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
It should just be a syscall updating a couple of fields in the kernel side
process info.  Confirming, in glibc is appears to be a shim for the setsid
syscall (based on not finding any code implementing anything special for it)
and in uclibc (*much* easier to read) it is clearly just a setsid syscall shim.

A breadcrumb _suggesting_ that it is not allowed on Darwin/macOS comes from
a commit in emacs: https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00297.html
but I don't have a way to verify if that is true or not.
As we are not supporting vfork on macOS today I just left a note in a comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants