mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
CloseMultipleNowOrOnExec(): promote out of test.
This function will be useful in upcoming non-test code. Because the first Crashpad client that wants a Crashpad handler will now be responsible for starting the handler process, this will prevent file descriptors from leaking to the handler process. R=rsesek@chromium.org Review URL: https://codereview.chromium.org/819483002
This commit is contained in:
parent
5f5e342584
commit
110eafe9a1
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
#include "util/test/posix/close_multiple.h"
|
#include "util/posix/close_multiple.h"
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
@ -12,8 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
#ifndef CRASHPAD_UTIL_TEST_POSIX_CLOSE_MULTIPLE_H_
|
#ifndef CRASHPAD_UTIL_POSIX_CLOSE_MULTIPLE_H_
|
||||||
#define CRASHPAD_UTIL_TEST_POSIX_CLOSE_MULTIPLE_H_
|
#define CRASHPAD_UTIL_POSIX_CLOSE_MULTIPLE_H_
|
||||||
|
|
||||||
namespace crashpad {
|
namespace crashpad {
|
||||||
|
|
||||||
@ -41,4 +41,4 @@ void CloseMultipleNowOrOnExec(int fd, int preserve_fd);
|
|||||||
|
|
||||||
} // namespace crashpad
|
} // namespace crashpad
|
||||||
|
|
||||||
#endif // CRASHPAD_UTIL_TEST_POSIX_CLOSE_MULTIPLE_H_
|
#endif // CRASHPAD_UTIL_POSIX_CLOSE_MULTIPLE_H_
|
@ -21,8 +21,8 @@
|
|||||||
#include "base/posix/eintr_wrapper.h"
|
#include "base/posix/eintr_wrapper.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "util/misc/scoped_forbid_return.h"
|
#include "util/misc/scoped_forbid_return.h"
|
||||||
|
#include "util/posix/close_multiple.h"
|
||||||
#include "util/test/errors.h"
|
#include "util/test/errors.h"
|
||||||
#include "util/test/posix/close_multiple.h"
|
|
||||||
|
|
||||||
namespace crashpad {
|
namespace crashpad {
|
||||||
namespace test {
|
namespace test {
|
||||||
|
@ -99,6 +99,8 @@
|
|||||||
'numeric/in_range_cast.h',
|
'numeric/in_range_cast.h',
|
||||||
'numeric/int128.h',
|
'numeric/int128.h',
|
||||||
'numeric/safe_assignment.h',
|
'numeric/safe_assignment.h',
|
||||||
|
'posix/close_multiple.cc',
|
||||||
|
'posix/close_multiple.h',
|
||||||
'posix/close_stdio.cc',
|
'posix/close_stdio.cc',
|
||||||
'posix/close_stdio.h',
|
'posix/close_stdio.h',
|
||||||
'posix/drop_privileges.cc',
|
'posix/drop_privileges.cc',
|
||||||
@ -210,8 +212,6 @@
|
|||||||
'test/multiprocess.h',
|
'test/multiprocess.h',
|
||||||
'test/multiprocess_exec.cc',
|
'test/multiprocess_exec.cc',
|
||||||
'test/multiprocess_exec.h',
|
'test/multiprocess_exec.h',
|
||||||
'test/posix/close_multiple.cc',
|
|
||||||
'test/posix/close_multiple.h',
|
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="mac"', {
|
['OS=="mac"', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user