summaryrefslogtreecommitdiffstats
path: root/base/process_util_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r--base/process_util_unittest.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index 672e396..1b7368a 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -485,12 +485,15 @@ std::string TestLaunchApp(const base::environment_vector& env_changes) {
fds_to_remap.push_back(std::make_pair(fds[1], 1));
EXPECT_TRUE(base::LaunchApp(args, env_changes, fds_to_remap,
- true /* wait for exit */, &handle));
- PCHECK(close(fds[1]) == 0);
+ true /* wait for exit */, &handle));
+ PCHECK(HANDLE_EINTR(close(fds[1])) == 0);
char buf[512];
const ssize_t n = HANDLE_EINTR(read(fds[0], buf, sizeof(buf)));
PCHECK(n > 0);
+
+ PCHECK(HANDLE_EINTR(close(fds[0])) == 0);
+
return std::string(buf, n);
}