1 // 2 // Copyright 2023 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // process.h: 7 // Process manages a child process. This is largely copied from chrome. 8 // 9 10 #ifndef LIBANGLE_RENDERER_METAL_PROCESS_H_ 11 #define LIBANGLE_RENDERER_METAL_PROCESS_H_ 12 13 #include <sys/types.h> 14 #include <string> 15 #include <vector> 16 17 namespace rx 18 { 19 namespace mtl 20 { 21 22 class Process 23 { 24 public: 25 Process(const std::vector<std::string> &argv); 26 Process(const Process &) = delete; 27 Process &operator=(const Process &) = delete; 28 ~Process(); 29 30 bool WaitForExit(int &exit_code); 31 bool DidLaunch() const; 32 33 private: 34 const pid_t pid_; 35 }; 36 37 } // namespace mtl 38 } // namespace rx 39 40 #endif /* LIBANGLE_RENDERER_METAL_PROCESS_H_ */ 41