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

Side by Side Diff: util/test/posix/close_multiple.h

Issue 531203002: Add the MultiprocessExec test and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Fix indentation Created 6 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 unified diff | Download patch
« no previous file with comments | « util/test/multiprocess_exec_test_child.cc ('k') | util/test/posix/close_multiple.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 16 matching lines...) Expand all
27 //! child process does not inherit file descriptors that it has no need for. 27 //! child process does not inherit file descriptors that it has no need for.
28 //! 28 //!
29 //! Unlike the BSD function, this function may not close file descriptors 29 //! Unlike the BSD function, this function may not close file descriptors
30 //! immediately, but may instead mark them as close-on-exec. The actual behavior 30 //! immediately, but may instead mark them as close-on-exec. The actual behavior
31 //! chosen is specific to the operating system. On Mac OS X, file descriptors 31 //! chosen is specific to the operating system. On Mac OS X, file descriptors
32 //! are marked close-on-exec instead of being closed outright in order to avoid 32 //! are marked close-on-exec instead of being closed outright in order to avoid
33 //! raising `EXC_GUARD` exceptions for guarded file descriptors that are 33 //! raising `EXC_GUARD` exceptions for guarded file descriptors that are
34 //! protected against `close()`. 34 //! protected against `close()`.
35 //! 35 //!
36 //! \param[in] fd The lowest file descriptor to close or set as close-on-exec. 36 //! \param[in] fd The lowest file descriptor to close or set as close-on-exec.
37 void CloseMultipleNowOrOnExec(int fd); 37 //! \param[in] preserve_fd A file descriptor to preserve and not close (or set
38 //! as close-on-exec), even if it is open and its value is greater than \a
39 //! fd. To not preserve any file descriptor, pass `-1` for this parameter.
40 void CloseMultipleNowOrOnExec(int fd, int preserve_fd);
38 41
39 } // namespace crashpad 42 } // namespace crashpad
40 43
41 #endif // CRASHPAD_UTIL_TEST_POSIX_CLOSE_MULTIPLE_H_ 44 #endif // CRASHPAD_UTIL_TEST_POSIX_CLOSE_MULTIPLE_H_
OLDNEW
« no previous file with comments | « util/test/multiprocess_exec_test_child.cc ('k') | util/test/posix/close_multiple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698