Lines Matching refs:fd
102 static int JSON_write(int fd, cJSON *json);
104 static cJSON *JSON_read(int fd);
2570 JSON_write(int fd, cJSON *json) in JSON_write() argument
2582 if (Nwrite(fd, (char*) &nsize, sizeof(nsize), Ptcp) < 0) in JSON_write()
2585 if (Nwrite(fd, str, hsize, Ptcp) < 0) in JSON_write()
2596 JSON_read(int fd) in JSON_read() argument
2608 if (Nread(fd, (char*) &nsize, sizeof(nsize), Ptcp) >= 0) { in JSON_read()
2613 rc = Nread(fd, str, hsize, Ptcp); in JSON_read()
4534 int fd; in iperf_create_pidfile() local
4538 fd = open(test->pidfile, O_RDONLY, 0); in iperf_create_pidfile()
4539 if (fd >= 0) { in iperf_create_pidfile()
4540 if (read(fd, buf, sizeof(buf) - 1) >= 0) { in iperf_create_pidfile()
4566 fd = open(test->pidfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR|S_IWUSR); in iperf_create_pidfile()
4567 if (fd < 0) { in iperf_create_pidfile()
4571 if (write(fd, buf, strlen(buf)) < 0) { in iperf_create_pidfile()
4574 if (close(fd) < 0) { in iperf_create_pidfile()