mirror of
https://github.com/golang/go.git
synced 2025-05-30 19:52:53 +00:00
In Android version 11 and earlier, pidfd-related system calls are not allowed by the seccomp policy, which causes crashes due to SIGSYS signals. Fixes #69065 Change-Id: Ib29631639a5cf221ac11b4d82390cb79436b8657 GitHub-Last-Rev: aad6b3b32c81795f86bc4a9e81aad94899daf520 GitHub-Pull-Request: golang/go#69543 Reviewed-on: https://go-review.googlesource.com/c/go/+/614277 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
23 lines
517 B
Go
23 lines
517 B
Go
// Copyright 2022 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build unix && !linux
|
|
|
|
package runtime
|
|
|
|
// sigFromUser reports whether the signal was sent because of a call
|
|
// to kill.
|
|
//
|
|
//go:nosplit
|
|
func (c *sigctxt) sigFromUser() bool {
|
|
return c.sigcode() == _SI_USER
|
|
}
|
|
|
|
// sigFromSeccomp reports whether the signal was sent from seccomp.
|
|
//
|
|
//go:nosplit
|
|
func (c *sigctxt) sigFromSeccomp() bool {
|
|
return false
|
|
}
|