Open wraps [unix.Open].
(path string, mode int, perm uint32)
| 34 | |
| 35 | // Open wraps [unix.Open]. |
| 36 | func Open(path string, mode int, perm uint32) (fd int, err error) { |
| 37 | fd, err = retryOnEINTR2(func() (int, error) { |
| 38 | return unix.Open(path, mode, perm) |
| 39 | }) |
| 40 | if err != nil { |
| 41 | return -1, &os.PathError{Op: "open", Path: path, Err: err} |
| 42 | } |
| 43 | return fd, nil |
| 44 | } |
| 45 | |
| 46 | // Openat wraps [unix.Openat]. |
| 47 | func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { |
no test coverage detected
searching dependent graphs…