| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/app/breakpad_linux.h" | 5 #include "chrome/app/breakpad_linux.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
| 10 #include <sys/time.h> | 10 #include <sys/time.h> |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 NULL, | 549 NULL, |
| 550 }; | 550 }; |
| 551 | 551 |
| 552 execv(kWgetBinary, const_cast<char**>(args)); | 552 execv(kWgetBinary, const_cast<char**>(args)); |
| 553 static const char msg[] = "Cannot upload crash dump: cannot exec " | 553 static const char msg[] = "Cannot upload crash dump: cannot exec " |
| 554 "/usr/bin/wget\n"; | 554 "/usr/bin/wget\n"; |
| 555 sys_write(2, msg, sizeof(msg) - 1); | 555 sys_write(2, msg, sizeof(msg) - 1); |
| 556 sys__exit(1); | 556 sys__exit(1); |
| 557 } | 557 } |
| 558 | 558 |
| 559 HANDLE_EINTR(sys_waitpid(child, NULL, 0)); |
| 559 return child; | 560 return child; |
| 560 } | 561 } |
| 561 | 562 |
| 562 // This is defined in chrome/browser/google_update_settings_posix.cc, it's the | 563 // This is defined in chrome/browser/google_update_settings_posix.cc, it's the |
| 563 // static string containing the user's unique GUID. We send this in the crash | 564 // static string containing the user's unique GUID. We send this in the crash |
| 564 // report. | 565 // report. |
| 565 namespace google_update { | 566 namespace google_update { |
| 566 extern std::string posix_guid; | 567 extern std::string posix_guid; |
| 567 } | 568 } |
| 568 | 569 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 EnableNonBrowserCrashDumping(); | 745 EnableNonBrowserCrashDumping(); |
| 745 } | 746 } |
| 746 | 747 |
| 747 // Set the base process uptime value. | 748 // Set the base process uptime value. |
| 748 struct timeval tv; | 749 struct timeval tv; |
| 749 if (!gettimeofday(&tv, NULL)) | 750 if (!gettimeofday(&tv, NULL)) |
| 750 uptime = timeval_to_ms(&tv); | 751 uptime = timeval_to_ms(&tv); |
| 751 else | 752 else |
| 752 uptime = 0; | 753 uptime = 0; |
| 753 } | 754 } |
| OLD | NEW |