Lines Matching refs:fd
75 static int fd;
265 if ((fd = open(STATE_LOCATION, O_RDWR)) < 0) {
267 if ((fd = mkstemp(tmpname)) == -1) {
279 (void) ftruncate(fd, (off_t)sizeof (shared_buffer_t));
282 PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
289 (void) close(fd);
336 int i, fd, retries = 0;
338 fd = open(URANDOM_PATH, O_RDONLY);
339 if (fd >= 0) {
341 i = read(fd, buf, nbytes);
355 (void) close(fd);
362 if (fd >= 0) {
363 (void) close(fd);
506 int fd;
511 fd = open(URANDOM_PATH, O_RDONLY);
512 if (fd >= 0) {
513 (void) close(fd);