#include "common.hh" #include "io.hh" #include "unique_fd.hh" void unique_fd::reset(int fd) { if (fd_ >= 0) io::close(fd_); fd_ = fd; }