| 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 NULL, | 601 NULL, |
| 602 }; | 602 }; |
| 603 | 603 |
| 604 execv(kWgetBinary, const_cast<char**>(args)); | 604 execv(kWgetBinary, const_cast<char**>(args)); |
| 605 static const char msg[] = "Cannot upload crash dump: cannot exec " | 605 static const char msg[] = "Cannot upload crash dump: cannot exec " |
| 606 "/usr/bin/wget\n"; | 606 "/usr/bin/wget\n"; |
| 607 sys_write(2, msg, sizeof(msg) - 1); | 607 sys_write(2, msg, sizeof(msg) - 1); |
| 608 sys__exit(1); | 608 sys__exit(1); |
| 609 } | 609 } |
| 610 | 610 |
| 611 HANDLE_EINTR(sys_waitpid(child, NULL, 0)); |
| 611 return child; | 612 return child; |
| 612 } | 613 } |
| 613 | 614 |
| 614 // This is defined in chrome/browser/google_update_settings_posix.cc, it's the | 615 // This is defined in chrome/browser/google_update_settings_posix.cc, it's the |
| 615 // static string containing the user's unique GUID. We send this in the crash | 616 // static string containing the user's unique GUID. We send this in the crash |
| 616 // report. | 617 // report. |
| 617 namespace google_update { | 618 namespace google_update { |
| 618 extern std::string posix_guid; | 619 extern std::string posix_guid; |
| 619 } | 620 } |
| 620 | 621 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 EnableNonBrowserCrashDumping(); | 800 EnableNonBrowserCrashDumping(); |
| 800 } | 801 } |
| 801 | 802 |
| 802 // Set the base process uptime value. | 803 // Set the base process uptime value. |
| 803 struct timeval tv; | 804 struct timeval tv; |
| 804 if (!gettimeofday(&tv, NULL)) | 805 if (!gettimeofday(&tv, NULL)) |
| 805 uptime = timeval_to_ms(&tv); | 806 uptime = timeval_to_ms(&tv); |
| 806 else | 807 else |
| 807 uptime = 0; | 808 uptime = 0; |
| 808 } | 809 } |
| OLD | NEW |