]> Cypherpunks repositories - gostls13.git/commit
runtime: don't call libc sigaction function in forked child
authorIan Lance Taylor <iant@golang.org>
Thu, 20 Jul 2017 06:42:27 +0000 (23:42 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 20 Jul 2017 18:02:47 +0000 (18:02 +0000)
commit28f650a2f7718b4fa7f55e06a0f75a85df90c517
tree360183af955c160ae6b94af195f54aff1ece793a
parent5125a967100643cebc4501e3d626b44b5ab15747
runtime: don't call libc sigaction function in forked child

If we are using vfork, and if something (such as TSAN) is intercepting
the sigaction function, then we must call the system call, not the
libc function. Otherwise the intercepted sigaction call in the child
may trash the data structures in the parent.

Change-Id: Id9588bfeaa934f32c920bf829c5839be5cacf243
Reviewed-on: https://go-review.googlesource.com/50251
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/cgo_sigaction.go
src/runtime/proc.go