Searched refs:self_fd (Results 1 – 2 of 2) sorted by relevance
34 ebpf::FileDesc self_fd(open("/proc/self/ns/mnt", O_RDONLY)); in ProcMountNS() local36 if (self_fd < 0 || target_fd < 0) in ProcMountNS()40 if (fstat(self_fd, &self_stat) != 0) in ProcMountNS()50 self_fd_ = std::move(self_fd); in ProcMountNS()
883 int self_fd = -1, target_fd = -1; in enter_mount_ns() local892 self_fd = open("/proc/self/ns/mnt", O_RDONLY | O_CLOEXEC); in enter_mount_ns()893 if (self_fd < 0) { in enter_mount_ns()904 if (fstat(self_fd, &self_stat)) { in enter_mount_ns()924 return self_fd; in enter_mount_ns()927 if (self_fd >= 0) in enter_mount_ns()928 close(self_fd); in enter_mount_ns()