OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/common/child_process.h" | 5 #include "chrome/common/child_process.h" |
6 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <signal.h> // For SigUSR1Handler below. | 8 #include <signal.h> // For SigUSR1Handler below. |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 title += label; // makes attaching to process easier | 90 title += label; // makes attaching to process easier |
91 std::wstring message = label; | 91 std::wstring message = label; |
92 message += L" starting with pid: "; | 92 message += L" starting with pid: "; |
93 message += UTF8ToWide(base::IntToString(base::GetCurrentProcId())); | 93 message += UTF8ToWide(base::IntToString(base::GetCurrentProcId())); |
94 ::MessageBox(NULL, message.c_str(), title.c_str(), | 94 ::MessageBox(NULL, message.c_str(), title.c_str(), |
95 MB_OK | MB_SETFOREGROUND); | 95 MB_OK | MB_SETFOREGROUND); |
96 #elif defined(OS_POSIX) | 96 #elif defined(OS_POSIX) |
97 // TODO(playmobil): In the long term, overriding this flag doesn't seem | 97 // TODO(playmobil): In the long term, overriding this flag doesn't seem |
98 // right, either use our own flag or open a dialog we can use. | 98 // right, either use our own flag or open a dialog we can use. |
99 // This is just to ease debugging in the interim. | 99 // This is just to ease debugging in the interim. |
100 LOG(WARNING) << label | 100 LOG(ERROR) << label |
jeremy
2010/12/02 08:33:56
Why did you change this to error?
| |
101 << " (" | 101 << " (" |
102 << getpid() | 102 << getpid() |
103 << ") paused waiting for debugger to attach @ pid"; | 103 << ") paused waiting for debugger to attach @ pid"; |
104 // Install a signal handler so that pause can be woken. | 104 // Install a signal handler so that pause can be woken. |
105 struct sigaction sa; | 105 struct sigaction sa; |
106 memset(&sa, 0, sizeof(sa)); | 106 memset(&sa, 0, sizeof(sa)); |
107 sa.sa_handler = SigUSR1Handler; | 107 sa.sa_handler = SigUSR1Handler; |
108 sigaction(SIGUSR1, &sa, NULL); | 108 sigaction(SIGUSR1, &sa, NULL); |
109 | 109 |
110 pause(); | 110 pause(); |
111 #endif // defined(OS_POSIX) | 111 #endif // defined(OS_POSIX) |
112 } | 112 } |
OLD | NEW |