]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/bluestore/bluestore_tool.cc
update sources to 12.2.10
[ceph.git] / ceph / src / os / bluestore / bluestore_tool.cc
index db55868692e4c68bb4cb8b669fd642715d89fda7..1320df831b83f5682e4bc155452a220e41b5f41e 100644 (file)
@@ -361,7 +361,7 @@ int main(int argc, char **argv)
        }
       } else {
        v += "\n";
-       int fd = ::open(p.c_str(), O_CREAT|O_TRUNC|O_WRONLY, 0600);
+       int fd = ::open(p.c_str(), O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0600);
        if (fd < 0) {
          cerr << "error writing " << p << ": " << cpp_strerror(errno)
               << std::endl;
@@ -491,7 +491,7 @@ int main(int argc, char **argv)
          exit(EXIT_FAILURE);
        }
        string path = out_dir + "/" + dir + "/" + file;
-       int fd = ::open(path.c_str(), O_CREAT|O_WRONLY|O_TRUNC, 0644);
+       int fd = ::open(path.c_str(), O_CREAT|O_WRONLY|O_TRUNC|O_CLOEXEC, 0644);
        if (fd < 0) {
          r = -errno;
          cerr << "open " << path << " failed: " << cpp_strerror(r) << std::endl;