how do i prevent line 3 from actually writing to the fd
int num_read = read(fd, &buf, BUF_SIZE);
buf[num_read] = '\0';
if (num_read == 0 || write(fd, buf, strlen(buf)) != strlen(buf)) {
    users[client_index].sock_fd = -1;
    return fd;
}