...
Source file
src/internal/poll/fd_opendir_darwin.go
1
2
3
4
5 package poll
6
7 import (
8 "syscall"
9 _ "unsafe"
10 )
11
12
13
14
15 func (fd *FD) OpenDir() (uintptr, string, error) {
16
17
18 fd2, call, err := fd.Dup()
19 if err != nil {
20 return 0, call, err
21 }
22 var dir uintptr
23 for {
24 dir, err = fdopendir(fd2)
25 if err != syscall.EINTR {
26 break
27 }
28 }
29 if err != nil {
30 syscall.Close(fd2)
31 return 0, "fdopendir", err
32 }
33 return dir, "", nil
34 }
35
36
37
38
39 func fdopendir(fd int) (dir uintptr, err error)
40
View as plain text