Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Unified Diff: services/native_support/make_pty_pair.h

Issue 1321253010: Add a "native_support" service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix android? Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/native_support/main.cc ('k') | services/native_support/make_pty_pair.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « services/native_support/main.cc ('k') | services/native_support/make_pty_pair.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698