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()
908 int self_fd = -1, target_fd = -1; in enter_mount_ns() local917 self_fd = open("/proc/self/ns/mnt", O_RDONLY | O_CLOEXEC); in enter_mount_ns()918 if (self_fd < 0) { in enter_mount_ns()929 if (fstat(self_fd, &self_stat)) { in enter_mount_ns()949 return self_fd; in enter_mount_ns()952 if (self_fd >= 0) in enter_mount_ns()953 close(self_fd); in enter_mount_ns()