Lines Matching defs:fd
21 int fd, status;
27 fd = open(file, O_RDWR);
28 if (fd < 0)
31 // reproduce bug 297991: mmap interferes with fd position
32 initial = lseek(fd, 123, SEEK_SET);
35 if (lseek(fd, 0, SEEK_CUR) != 123)
44 if (fcntl(fd, F_SETLK, &fl) != 0)
48 if (mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0) == MAP_FAILED)
50 if (lseek(fd, 0, SEEK_CUR) != 123)
56 if (fcntl(fd, F_SETLK, &fl) == 0)