Fix file descriptor leaks in ExternalDumper test
Patch by Chris Dearman <chris@mips.com> R=ted at http://breakpad.appspot.com/372002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@951 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
de8292b1d4
commit
789eac95fd
@ -736,6 +736,7 @@ TEST(ExceptionHandlerTest, ExternalDumper) {
|
||||
ASSERT_EQ(n, kCrashContextSize);
|
||||
ASSERT_EQ(msg.msg_controllen, kControlMsgSize);
|
||||
ASSERT_EQ(msg.msg_flags, 0);
|
||||
ASSERT_EQ(close(fds[0]), 0);
|
||||
|
||||
pid_t crashing_pid = -1;
|
||||
int signal_fd = -1;
|
||||
@ -764,6 +765,7 @@ TEST(ExceptionHandlerTest, ExternalDumper) {
|
||||
kCrashContextSize));
|
||||
static const char b = 0;
|
||||
HANDLE_EINTR(write(signal_fd, &b, 1));
|
||||
ASSERT_EQ(close(signal_fd), 0);
|
||||
|
||||
int status;
|
||||
ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user