Home | History | Annotate | Download | only in syscall

Lines Matching refs:newFD

47 // newFD adds impl to the file descriptor table,
50 func newFD(impl fileImpl) int {
67 newFD(&naclFile{naclFD: 0})
68 newFD(&naclFile{naclFD: 1})
69 newFD(&naclFile{naclFD: 2})
111 for newfd, oldf := range files.tab {
113 files.tab[newfd] = f
114 return newfd, nil
117 newfd := len(files.tab)
119 return newfd, nil
122 func Dup2(fd, newfd int) error {
125 if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil || newfd < 0 || newfd >= len(files.tab)+100 {
131 for cap(files.tab) <= newfd {
134 oldf := files.tab[newfd]
140 files.tab[newfd] = f
324 fd[0] = newFD(&pipeFile{rd: q})
325 fd[1] = newFD(&pipeFile{wr: q})