commit | 9f0b1ff7b46a4014ddb5d4bdb6602a43b882cb27 | [log] [tgz] |
---|---|---|
author | Brad Fitzpatrick <bradfitz@golang.org> | Mon Apr 22 18:34:53 2019 +0000 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Thu Apr 25 04:54:58 2019 +0000 |
tree | 2ae61a29095122aff47be4e6aec00dfd589273dd | |
parent | 18eb32c0e2f0c2bc8d17842ed4ad41486f349ad4 [diff] |
unix: add FileHandle, NewFileHandle, NameToHandleAt, OpenByHandleAt This adds wrappers around name_to_handle_at and open_by_handle_at. Requires root (or CAP_DAC_READ_SEARCH, rather) to run tests, which at least some of our builders have. bradfitz@go:~/src/golang.org/x/sys/unix$ go test -c && sudo ./unix.test -test.run=OpenBy -test.v=true === RUN TestOpenByHandleAt === RUN TestOpenByHandleAt/clone=false === RUN TestOpenByHandleAt/clone=true --- PASS: TestOpenByHandleAt (0.00s) syscall_linux_test.go:546: mountID: 22, handle: size=8, type=1, bytes="\x9e\x1e\b\x00~\x8c\xe5\x9d" --- PASS: TestOpenByHandleAt/clone=false (0.00s) syscall_linux_test.go:568: opened fd 3 --- PASS: TestOpenByHandleAt/clone=true (0.00s) syscall_linux_test.go:568: opened fd 3 PASS Fixes golang/go#30537 Change-Id: Ia48a8faab2fee665d88a16d81a3a0c1504b129ce Reviewed-on: https://go-review.googlesource.com/c/sys/+/173357 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This repository holds supplemental Go packages for low-level interactions with the operating system.
The easiest way to install is to run go get -u golang.org/x/sys
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/sys
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the sys repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.