Documentation ¶
Index ¶
- Constants
- func AbsTimeoutToTimeSpec(timeout time.Duration) *unix.Timespec
- func FlagsForAccess(flag int) int
- func FlagsForOpen(flag int) int
- func IsInterruptedSyscallErr(err error) bool
- func IsTimeoutErr(err error) bool
- func OpenOrCreate(creator func(bool) error, flag int) (bool, error)
- func SyscallErrHasCode(err error, code syscall.Errno) bool
- func SyscallNameFromErr(err error) string
- func TimeoutToTimeSpec(timeout time.Duration) *unix.Timespec
- func TmpFilename(name string) string
- func UninterruptedSyscall(f func() error) error
- func UninterruptedSyscallTimeout(f func(time.Duration) error, timeout time.Duration) error
- type Key
Constants ¶
View Source
const ( IpcCreate = 00001000 /* create if key is nonexistent */ IpcExcl = 00002000 /* fail if key exists */ IpcNoWait = 00004000 /* return error on wait */ IpcRmid = 0 /* remove resource */ IpcSet = 1 /* set ipc_perm options */ IpcStat = 2 /* get ipc_perm options */ IpcInfo = 3 /* see ipcs */ )
View Source
const (
O_NONBLOCK = syscall.O_NONBLOCK
)
Variables ¶
This section is empty.
Functions ¶
func FlagsForAccess ¶
func FlagsForOpen ¶
func IsInterruptedSyscallErr ¶
func IsTimeoutErr ¶
func OpenOrCreate ¶
OpenOrCreate performs open/create file operation according to the given mode. It allows to find out if the object was opened or created.
creator is the function which performs actual operation. It is called with 'true', if it must create an object, and with false otherwise. It must return an 'not exists error' if the param is false, and the object does not exist. It must return an 'already exists error' if the param is true, and the object already exists. flag is the combination of open flags from os package. If flag == os.O_CREATE, OpenOrCreate makes several attempts to open or create an object, and analyzes the return error. It tries to open the object first.
func SyscallNameFromErr ¶
func TmpFilename ¶
func UninterruptedSyscall ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.