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

Unified Diff: base/unix_domain_socket_posix.h

Issue 119335: Linux: refactor zygote support (Closed)
Patch Set: ... Created 11 years, 6 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 | « base/reserved_file_descriptors.h ('k') | base/unix_domain_socket_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/unix_domain_socket_posix.h
diff --git a/base/unix_domain_socket_posix.h b/base/unix_domain_socket_posix.h
new file mode 100644
index 0000000000000000000000000000000000000000..46c473aacbf41df87f47c28691d0b2732837b649
--- /dev/null
+++ b/base/unix_domain_socket_posix.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2009 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 BASE_UNIX_DOMAIN_SOCKET_POSIX_H_
+#define BASE_UNIX_DOMAIN_SOCKET_POSIX_H_
+
+#include <vector>
+
+namespace base {
+
+// Use sendmsg to write the given msg and include a vector
+// of file descriptors. Returns true iff successful.
+bool SendMsg(int fd, const void* msg, size_t length,
+ std::vector<int>& fds);
+// Use recvmsg to read a message and an array of file descriptors. Returns
+// -1 on failure. Note: will read, at most, 16 descriptors.
+ssize_t RecvMsg(int fd, void* msg, size_t length, std::vector<int>* fds);
+
+} // namespace base
+
+#endif // BASE_UNIX_DOMAIN_SOCKET_POSIX_H_
« no previous file with comments | « base/reserved_file_descriptors.h ('k') | base/unix_domain_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698