| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/eintr_wrapper.h" | 10 #include "base/eintr_wrapper.h" |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 args.push_back("echo $BASE_TEST"); | 504 args.push_back("echo $BASE_TEST"); |
| 505 | 505 |
| 506 int fds[2]; | 506 int fds[2]; |
| 507 PCHECK(pipe(fds) == 0); | 507 PCHECK(pipe(fds) == 0); |
| 508 | 508 |
| 509 fds_to_remap.push_back(std::make_pair(fds[1], 1)); | 509 fds_to_remap.push_back(std::make_pair(fds[1], 1)); |
| 510 base::LaunchOptions options; | 510 base::LaunchOptions options; |
| 511 options.wait = true; | 511 options.wait = true; |
| 512 options.environ = &env_changes; | 512 options.environ = &env_changes; |
| 513 options.fds_to_remap = &fds_to_remap; | 513 options.fds_to_remap = &fds_to_remap; |
| 514 EXPECT_TRUE(base::LaunchProcess(args, options)); | 514 EXPECT_TRUE(base::LaunchProcess(args, options, NULL)); |
| 515 PCHECK(HANDLE_EINTR(close(fds[1])) == 0); | 515 PCHECK(HANDLE_EINTR(close(fds[1])) == 0); |
| 516 | 516 |
| 517 char buf[512]; | 517 char buf[512]; |
| 518 const ssize_t n = HANDLE_EINTR(read(fds[0], buf, sizeof(buf))); | 518 const ssize_t n = HANDLE_EINTR(read(fds[0], buf, sizeof(buf))); |
| 519 PCHECK(n > 0); | 519 PCHECK(n > 0); |
| 520 | 520 |
| 521 PCHECK(HANDLE_EINTR(close(fds[0])) == 0); | 521 PCHECK(HANDLE_EINTR(close(fds[0])) == 0); |
| 522 | 522 |
| 523 return std::string(buf, n); | 523 return std::string(buf, n); |
| 524 } | 524 } |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 ASSERT_DEATH({ | 985 ASSERT_DEATH({ |
| 986 SetUpInDeathAssert(); | 986 SetUpInDeathAssert(); |
| 987 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} | 987 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} |
| 988 }, ""); | 988 }, ""); |
| 989 } | 989 } |
| 990 | 990 |
| 991 #endif // !ARCH_CPU_64_BITS | 991 #endif // !ARCH_CPU_64_BITS |
| 992 #endif // OS_MACOSX | 992 #endif // OS_MACOSX |
| 993 | 993 |
| 994 #endif // !defined(OS_WIN) | 994 #endif // !defined(OS_WIN) |
| OLD | NEW |