]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: revert use of __fork to work around Apple atfork bugs
authorRuss Cox <rsc@golang.org>
Wed, 4 Jan 2023 14:18:02 +0000 (09:18 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 10 Jan 2023 20:34:19 +0000 (20:34 +0000)
commit0a0de0fc4241c7531860e3c1a03ab4a4643ec37f
tree22a668955d1905d39e4c368365051628863f3010
parent82f09b75ca181a6be0e594e1917e4d3d91934b27
runtime: revert use of __fork to work around Apple atfork bugs

An Apple engineer suggests that since __fork is not public API,
it would be better to use a different fix. With the benefit of source code,
they suggest using xpc_date_create_from_current instead of
xpc_atfork_child. The latter sets some flags that disable certain
functionality for the remainder of the process lifetime (expecting exec),
while the former should do the necessary setup.

Reverting the __fork fix in order to prepare a clean fix based
on CL 451735 using xpc_date_create_from_current.

This reverts commit c61d322d5f9e3fcffa4c523892af432dca030c12.

Change-Id: I2da293ff537237ffd2d40ad756d827c95c84635b
Reviewed-on: https://go-review.googlesource.com/c/go/+/460475
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/syscall/exec_libc2.go
src/syscall/syscall_darwin.go
src/syscall/syscall_openbsd_libc.go
src/syscall/zsyscall_darwin_amd64.go
src/syscall/zsyscall_darwin_amd64.s
src/syscall/zsyscall_darwin_arm64.go
src/syscall/zsyscall_darwin_arm64.s