Index: services/native_support/make_pty_pair.h |
diff --git a/services/native_support/make_pty_pair.h b/services/native_support/make_pty_pair.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7d6a9d7dd03a711e9ae448e26e08d68086f91dba |
--- /dev/null |
+++ b/services/native_support/make_pty_pair.h |
@@ -0,0 +1,24 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SERVICES_NATIVE_SUPPORT_MAKE_PTY_PAIR_H_ |
+#define SERVICES_NATIVE_SUPPORT_MAKE_PTY_PAIR_H_ |
+ |
+#include <memory> |
+#include <vector> |
+ |
+#include "base/files/scoped_file.h" |
+ |
+namespace native_support { |
+ |
+// Makes a pseudoterminal master-slave pair of FDs. Returns true on success and |
+// false on failure in which case it sets |*errno_value| appropriately (and |
+// touches neither |master_fd| nor |slave_fd|). |
+bool MakePtyPair(base::ScopedFD* master_fd, |
+ base::ScopedFD* slave_fd, |
+ int* errno_value); |
+ |
+} // namespace native_support |
+ |
+#endif // SERVICES_NATIVE_SUPPORT_MAKE_PTY_PAIR_H_ |