int prev_fd = open(".", O_RDONLY | O_DIRECTORY);
system_fd_set_cloexec(prev_fd);
if (fd >= 0)
- fchdir(fd);
+ if (fchdir(fd)) {}
return prev_fd;
}
static void
netifd_dir_pop(int prev_fd)
{
- fchdir(prev_fd);
+ if (fchdir(prev_fd)) {}
close(prev_fd);
}
}
}
if (proc->dir_fd >= 0)
- fchdir(proc->dir_fd);
+ if (fchdir(proc->dir_fd)) {}
close(pfds[0]);
if (fd < 0)
return;
- write(fd, val, strlen(val));
+ if (write(fd, val, strlen(val))) {}
close(fd);
}
if (fd < 0)
continue;
- write(fd, "-1", 2);
+ if (write(fd, "-1", 2)) {}
close(fd);
}
return 0;