unix
packagestandard libraryThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
- func Eaccess(path string, mode uint32) error
- func Fchmodat(dirfd int, path string, mode uint32, flags int) error
- func Fchownat(dirfd int, path string, uid, gid int, flags int) error
- func Fcntl(fd int, cmd int, arg int) (int, error)
- func Fstatat(dirfd int, path string, stat *syscall.Stat_t, flags int) error
- func GetRandom(p []byte, flags GetRandomFlag) (n int, err error)
- func HasNonblockFlag(flag int) bool
- func IsNonblock(fd int) (nonblocking bool, err error)
- func KernelVersion() (major, minor int)
- func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flag int) error
- func Mkdirat(dirfd int, path string, mode uint32) error
- func Openat(dirfd int, path string, flags int, perm uint32) (int, error)
- func PidFDOpen(pid, flags int) (uintptr, error)
- func PidFDSendSignal(pidfd uintptr, s syscall.Signal) error
- func Readlinkat(dirfd int, path string, buf []byte) (int, error)
- func RecvfromInet4(fd int, p []byte, flags int, from *syscall.SockaddrInet4) (int, error)
- func RecvfromInet6(fd int, p []byte, flags int, from *syscall.SockaddrInet6) (n int, err error)
- func RecvmsgInet4(fd int, p, oob []byte, flags int, from *syscall.SockaddrInet4) (n, oobn int, recvflags int, err error)
- func RecvmsgInet6(fd int, p, oob []byte, flags int, from *syscall.SockaddrInet6) (n, oobn int, recvflags int, err error)
- func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) error
- func SendmsgNInet4(fd int, p, oob []byte, to *syscall.SockaddrInet4, flags int) (n int, err error)
- func SendmsgNInet6(fd int, p, oob []byte, to *syscall.SockaddrInet6, flags int) (n int, err error)
- func SendtoInet4(fd int, p []byte, flags int, to *syscall.SockaddrInet4) (err error)
- func SendtoInet6(fd int, p []byte, flags int, to *syscall.SockaddrInet6) (err error)
- func Symlinkat(oldpath string, newdirfd int, newpath string) error
- func Tcsetpgrp(fd int, pgid int32) (err error)
- func Unlinkat(dirfd int, path string, flags int) error
- func Utimensat(dirfd int, path string, times *[2]syscall.Timespec, flag int) error
- func Waitid(idType int, id int, info *SiginfoChild, options int, rusage *syscall.Rusage) error
- type GetRandomFlag
- type SiginfoChild
Constants¶
const (AT_EACCESS = 0x200AT_FDCWD = -0x64AT_REMOVEDIR = 0x200AT_SYMLINK_NOFOLLOW = 0x100UTIME_OMIT = 0x3ffffffe)
const (R_OK = 0x4W_OK = 0x2X_OK = 0x1// NoFollowErrno is the error returned from open/openat called with// O_NOFOLLOW flag, when the trailing component (basename) of the path// is a symbolic link.NoFollowErrno = noFollowErrno)
const (P_PID = 1P_PIDFD = 3)
Variables¶
This section is empty.
Functions¶
funcCopyFileRange¶added ingo1.15
funcGetRandom¶
func GetRandom(p []byte, flagsGetRandomFlag) (nint, errerror)
GetRandom calls the getrandom system call.
funcHasNonblockFlag¶added ingo1.20.5
funcIsNonblock¶added ingo1.11
funcKernelVersion¶added ingo1.20
func KernelVersion() (major, minorint)
KernelVersion returns major and minor kernel version numbersparsed from the syscall.Uname's Release field, or (0, 0) ifthe version can't be obtained or parsed.
funcRecvfromInet4¶added ingo1.18
funcRecvfromInet6¶added ingo1.18
funcRecvmsgInet4¶added ingo1.18
funcRecvmsgInet6¶added ingo1.18
funcSendmsgNInet4¶added ingo1.18
funcSendmsgNInet6¶added ingo1.18
funcSendtoInet4¶added ingo1.18
funcSendtoInet6¶added ingo1.18
Types¶
typeGetRandomFlag¶
type GetRandomFlaguintptr
GetRandomFlag is a flag supported by the getrandom system call.
const (// GRND_NONBLOCK means return EAGAIN rather than blocking.GRND_NONBLOCKGetRandomFlag = 0x0001// GRND_RANDOM means use the /dev/random pool instead of /dev/urandom.GRND_RANDOMGetRandomFlag = 0x0002)
typeSiginfoChild¶added ingo1.23.0
type SiginfoChild struct {Signoint32Pidint32Uiduint32Statusint32// contains filtered or unexported fields}
SiginfoChild is a struct filled in by Linux waitid syscall.In C, siginfo_t contains a union with multiple members;this struct corresponds to one used when Signo is SIGCHLD.
NOTE fields are exported to be used by TestSiginfoChildLayout.
func (*SiginfoChild)WaitStatus¶added ingo1.23.0
func (s *SiginfoChild) WaitStatus() (wssyscall.WaitStatus)
WaitStatus converts SiginfoChild, as filled in by the waitid syscall,to syscall.WaitStatus.
Source Files¶
- at.go
- at_fstatat.go
- at_sysnum_linux.go
- at_sysnum_newfstatat_linux.go
- constants.go
- copy_file_range_unix.go
- eaccess.go
- faccessat_syscall.go
- fcntl_unix.go
- getrandom.go
- getrandom_linux.go
- kernel_version_linux.go
- net.go
- nofollow_posix.go
- nonblocking_unix.go
- pidfd_linux.go
- renameat_sysnum_linux.go
- siginfo_linux.go
- siginfo_linux_other.go
- syscall.go
- sysnum_linux_amd64.go
- tcsetpgrp_linux.go
- utimes.go
- waitid_linux.go