golang

command
v0.2.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2020 License: GPL-2.0 Imports: 6 Imported by: 0

README

This directory contains some test code for system calls that need
POSIX semantics to work under Go. There are 9 system calls wrapped in
a nptl:setxid mechanism in glibc, and the following development patch
adds support for these 9 to native Go.

https://go-review.googlesource.com/c/go/+/210639/

The Go support works with or without CGO_ENABLED.

With a patched Go runtime library:

  make
  sudo ./posix
  sudo ./posix-cgo

should validate that all is working as intended.

The above Go patch also exposes the mechanism that achieves this in
the Go runtime, to ensure that the native Go "libcap/cap" package can
work with and without CGO_ENABLED.

Andrew G. Morgan <morgan@kernel.org>
2019-12-10

Documentation

Overview

Program posix is a test case to confirm that Go is capable of exhibiting posix semantics for system calls.

This code is a template for two programs: posix.go and posix-cgo.go which are built by the Makefile to using sed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL