Lines Matching refs:fd

99 int uv__io_check_fd(uv_loop_t* loop, int fd) {  in uv__io_check_fd()  argument
107 if (uv__fstat(fd, &sb)) in uv__io_check_fd()
131 if (!fcntl(fd, F_GETPATH, path)) in uv__io_check_fd()
137 EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, 0); in uv__io_check_fd()
141 EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); in uv__io_check_fd()
184 int fd; in uv__io_poll() local
205 assert(w->fd >= 0); in uv__io_poll()
206 assert(w->fd < (int) loop->nwatchers); in uv__io_poll()
220 EV_SET(events + nevents, w->fd, filter, op, fflags, 0, 0); in uv__io_poll()
230 EV_SET(events + nevents, w->fd, EVFILT_WRITE, EV_ADD, 0, 0, 0); in uv__io_poll()
240 EV_SET(events + nevents, w->fd, EV_OOBAND, EV_ADD, 0, 0, 0); in uv__io_poll()
343 fd = ev->ident; in uv__io_poll()
349 if (process->pid == fd) { in uv__io_poll()
360 if (fd == -1) in uv__io_poll()
362 w = loop->watchers[fd]; in uv__io_poll()
373 assert(fd == w->fd); in uv__io_poll()
485 void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) { in uv__platform_invalidate_fd() argument
491 assert(fd >= 0); in uv__platform_invalidate_fd()
500 if ((int) events[i].ident == fd && events[i].filter != EVFILT_PROC) in uv__platform_invalidate_fd()
528 if (fcntl(handle->event_watcher.fd, F_GETPATH, pathbuf) == 0) in uv__fs_event()
538 if (handle->event_watcher.fd != -1 && in uv__fs_event()
539 (!uv__fstat(handle->event_watcher.fd, &statbuf) && !(statbuf.st_mode & S_IFDIR))) { in uv__fs_event()
547 if (fcntl(handle->event_watcher.fd, F_KINFO, &kf) == 0) in uv__fs_event()
553 if (handle->event_watcher.fd == -1) in uv__fs_event()
560 EV_SET(&ev, w->fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, fflags, 0, 0); in uv__fs_event()
577 int fd; in uv_fs_event_start() local
591 fd = open(handle->path, O_RDONLY); in uv_fs_event_start()
592 if (fd == -1) { in uv_fs_event_start()
605 if (uv__fstat(fd, &statbuf)) in uv_fs_event_start()
615 uv__close_nocheckstdio(fd); in uv_fs_event_start()
616 handle->event_watcher.fd = -1; in uv_fs_event_start()
630 uv__io_init(&handle->event_watcher, uv__fs_event, fd); in uv_fs_event_start()
653 if (handle->event_watcher.fd != -1) { in uv_fs_event_stop()
655 uv__close(handle->event_watcher.fd); in uv_fs_event_stop()
656 handle->event_watcher.fd = -1; in uv_fs_event_stop()