Lines Matching refs:fd
523 int len, fd = -1;
541 if ((fd = open(path, O_RDONLY|O_NONBLOCK)) == -1) {
554 if (fstat(fd, &buf) == -1) {
568 if ((fp = fdopen(fd, "r")) == NULL) {
601 if (fd != -1)
602 (void) close(fd);
1825 int fd, len;
1845 if ((fd = mkstemp(tmp_file)) == -1) {
1850 if (fstat(fd, &buf) == -1) {
1860 if ((fp = fdopen(fd, "w")) == NULL) {
1879 (void) close(fd);
1881 fd = -1;
1889 if (fd != -1) {
1890 (void) close(fd);
2135 int i, fd;
2228 if ((fd = open(ps->uniqfile,
2236 if ((fd = open(ps->uniqfile,
2238 if (fstat(fd, &status) == -1 ||
2279 if ((fd = mkstemp(tmp_file)) == -1) {
2286 if (fstat(fd, &status) == -1 ||
2385 if ((n = write(fd, ps->content, n)) == 0) {
2407 if (fd != -1) {
2408 (void) close(fd);