Lines Matching refs:fd
43 set_cloexec_flag (int fd)
47 oldflags= fcntl (fd, F_GETFD, 0);
51 return fcntl (fd, F_SETFD, oldflags);
62 int fd;
64 fd = open ( name, O_RDONLY );
65 if ( fd == -1 )
68 if (set_cloexec_flag (fd))
69 log_error ("error setting FD_CLOEXEC on fd %d: %s\n",
70 fd, strerror (errno));
78 if( fstat( fd, &sb ) )
83 return fd;
95 int fd;
117 fd = fd_random;
123 fd = fd_urandom;
138 FD_SET(fd, &rfds);
141 if ( !(rc=select(fd+1, &rfds, NULL, NULL, &tv)) )
165 n = read(fd, buffer, nbytes );