OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/zygote_host/zygote_host_impl_linux.h" | 5 #include "content/browser/zygote_host/zygote_host_impl_linux.h" |
6 | 6 |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 Pickle pickle; | 444 Pickle pickle; |
445 | 445 |
446 pickle.WriteInt(kZygoteCommandReap); | 446 pickle.WriteInt(kZygoteCommandReap); |
447 pickle.WriteInt(process); | 447 pickle.WriteInt(process); |
448 if (!SendMessage(pickle, NULL)) | 448 if (!SendMessage(pickle, NULL)) |
449 LOG(ERROR) << "Failed to send Reap message to zygote"; | 449 LOG(ERROR) << "Failed to send Reap message to zygote"; |
450 } | 450 } |
451 | 451 |
452 base::TerminationStatus ZygoteHostImpl::GetTerminationStatus( | 452 base::TerminationStatus ZygoteHostImpl::GetTerminationStatus( |
453 base::ProcessHandle handle, | 453 base::ProcessHandle handle, |
| 454 bool known_dead, |
454 int* exit_code) { | 455 int* exit_code) { |
455 DCHECK(init_); | 456 DCHECK(init_); |
456 Pickle pickle; | 457 Pickle pickle; |
457 pickle.WriteInt(kZygoteCommandGetTerminationStatus); | 458 pickle.WriteInt(kZygoteCommandGetTerminationStatus); |
| 459 pickle.WriteBool(known_dead); |
458 pickle.WriteInt(handle); | 460 pickle.WriteInt(handle); |
459 | 461 |
460 // Set this now to handle the early termination cases. | 462 // Set this now to handle the early termination cases. |
461 if (exit_code) | 463 if (exit_code) |
462 *exit_code = RESULT_CODE_NORMAL_EXIT; | 464 *exit_code = RESULT_CODE_NORMAL_EXIT; |
463 | 465 |
464 static const unsigned kMaxMessageLength = 128; | 466 static const unsigned kMaxMessageLength = 128; |
465 char buf[kMaxMessageLength]; | 467 char buf[kMaxMessageLength]; |
466 ssize_t len; | 468 ssize_t len; |
467 { | 469 { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 return RenderSandboxHostLinux::GetInstance()->pid(); | 504 return RenderSandboxHostLinux::GetInstance()->pid(); |
503 } | 505 } |
504 | 506 |
505 int ZygoteHostImpl::GetSandboxStatus() const { | 507 int ZygoteHostImpl::GetSandboxStatus() const { |
506 if (have_read_sandbox_status_word_) | 508 if (have_read_sandbox_status_word_) |
507 return sandbox_status_; | 509 return sandbox_status_; |
508 return 0; | 510 return 0; |
509 } | 511 } |
510 | 512 |
511 } // namespace content | 513 } // namespace content |
OLD | NEW |