Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Issue 460094: Make POSIX SIGTERM/SIGINT/SIGHUP handler async signal safe. (Closed)

Created:
11 years ago by willchan no longer on Chromium
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Make POSIX SIGTERM/SIGINT/SIGHUP handler async signal safe. * Don't use LOG/CHECK. Replace with RAW_LOG/DCHECK (newly added to logging.h) * Don't directly post a task to the UI loop. Write to a magic pipe. Read this from a separate thread which will post to a task to the UI loop. BUG=http://crbug.com/29240 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=34036

Patch Set 1 #

Total comments: 11

Patch Set 2 : Address comments. #

Total comments: 21

Patch Set 3 : Delete unused code. #

Patch Set 4 : Address mark's comments. #

Total comments: 17

Patch Set 5 : Address more of mark's comments. #

Total comments: 1

Patch Set 6 : Remove unneeded semicolon. #

Total comments: 3

Patch Set 7 : move shutdown thread creation after UI thread is registered. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -31 lines) Patch
M base/logging.h View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M base/logging.cc View 1 2 3 4 5 3 chunks +37 lines, -0 lines 0 comments Download
M chrome/browser/browser_main.cc View 1 2 3 4 5 6 5 chunks +104 lines, -31 lines 1 comment Download

Messages

Total messages: 20 (0 generated)
willchan no longer on Chromium
I was going to use a recurring select() task on the UI thread, but jar ...
11 years ago (2009-12-05 02:49:47 UTC) #1
Mark Mentovai
I have a couple of high-level comments in advance of doing a proper review. 1. ...
11 years ago (2009-12-06 16:58:12 UTC) #2
willchan no longer on Chromium
On 2009/12/06 16:58:12, Mark Mentovai wrote: > I have a couple of high-level comments in ...
11 years ago (2009-12-07 17:50:21 UTC) #3
Mark Mentovai
willchan@chromium.org wrote: > Fair enough. For some reason, I thought that WorkerPool and base::Thread were ...
11 years ago (2009-12-07 18:16:48 UTC) #4
agl
http://codereview.chromium.org/460094/diff/1/3 File base/logging.h (right): http://codereview.chromium.org/460094/diff/1/3#newcode784 base/logging.h:784: logging::RawLog(logging::LOG_FATAL, "Check failed: " #condition "\n", \ If RawLog ...
11 years ago (2009-12-07 18:56:09 UTC) #5
willchan no longer on Chromium
Mark, I still found some of the logging messages useful, so I kept the RAW_LOG. ...
11 years ago (2009-12-07 19:56:14 UTC) #6
agl
http://codereview.chromium.org/460094/diff/1/4 File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/460094/diff/1/4#newcode173 chrome/browser/browser_main.cc:173: int g_shutdown_pipe_write_fd = -1; On 2009/12/07 19:56:14, willchan wrote: ...
11 years ago (2009-12-07 20:01:05 UTC) #7
willchan no longer on Chromium
http://codereview.chromium.org/460094/diff/1/4 File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/460094/diff/1/4#newcode251 chrome/browser/browser_main.cc:251: fd_set read_fds; On 2009/12/07 20:01:05, agl wrote: > This ...
11 years ago (2009-12-07 20:28:35 UTC) #8
Mark Mentovai
http://codereview.chromium.org/460094/diff/3001/3002 File base/logging.cc (right): http://codereview.chromium.org/460094/diff/3001/3002#newcode693 base/logging.cc:693: void RawLog(int lvl, const char* message) { Again with ...
11 years ago (2009-12-07 20:29:39 UTC) #9
willchan no longer on Chromium
Thanks for pointing out PLOG to me, I didn't know that existed. http://codereview.chromium.org/460094/diff/3001/3002 File base/logging.cc ...
11 years ago (2009-12-07 21:00:49 UTC) #10
Mark Mentovai
willchan@chromium.org wrote: > Thanks for pointing out PLOG to me, I didn't know that existed. ...
11 years ago (2009-12-07 21:06:48 UTC) #11
Mark Mentovai
http://codereview.chromium.org/460094/diff/17/18 File base/logging.cc (right): http://codereview.chromium.org/460094/diff/17/18#newcode698 base/logging.cc:698: do { Move "while (bytes_written < message_len) {" to ...
11 years ago (2009-12-07 21:27:38 UTC) #12
willchan no longer on Chromium
http://codereview.chromium.org/460094/diff/17/18 File base/logging.cc (right): http://codereview.chromium.org/460094/diff/17/18#newcode698 base/logging.cc:698: do { On 2009/12/07 21:27:38, Mark Mentovai wrote: > ...
11 years ago (2009-12-07 22:20:19 UTC) #13
Mark Mentovai
Nice. LGTM now. Thanks for fixing this. http://codereview.chromium.org/460094/diff/5003/3013 File base/logging.cc (right): http://codereview.chromium.org/460094/diff/5003/3013#newcode707 base/logging.cc:707: }; ; ...
11 years ago (2009-12-07 23:17:16 UTC) #14
jam
http://codereview.chromium.org/460094/diff/26/29 File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/460094/diff/26/29#newcode184 chrome/browser/browser_main.cc:184: if (ChromeThread::HasThread(ChromeThread::UI)) { Is there no other way to ...
11 years ago (2009-12-07 23:40:25 UTC) #15
willchan no longer on Chromium
http://codereview.chromium.org/460094/diff/26/29 File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/460094/diff/26/29#newcode184 chrome/browser/browser_main.cc:184: if (ChromeThread::HasThread(ChromeThread::UI)) { On 2009/12/07 23:40:25, John Abd-El-Malek wrote: ...
11 years ago (2009-12-08 03:16:10 UTC) #16
Mark Mentovai
I think the most recent changes are fine. LGTM still.
11 years ago (2009-12-08 03:27:50 UTC) #17
jam
http://codereview.chromium.org/460094/diff/26/29 File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/460094/diff/26/29#newcode184 chrome/browser/browser_main.cc:184: if (ChromeThread::HasThread(ChromeThread::UI)) { On 2009/12/08 03:16:11, willchan wrote: > ...
11 years ago (2009-12-08 05:25:23 UTC) #18
Hironori Bono
willchan, Sorry for my stupid comment in advance. One of our Linux buildbots has been ...
11 years ago (2009-12-08 09:41:40 UTC) #19
Hironori Bono
11 years ago (2009-12-08 09:44:53 UTC) #20
http://codereview.chromium.org/460094/diff/5005/3020
File chrome/browser/browser_main.cc (right):

http://codereview.chromium.org/460094/diff/5005/3020#newcode432
chrome/browser/browser_main.cc:432: new
ShutdownDetector(g_shutdown_pipe_read_fd))) {
I'm wondering when this ShutdownDetector instance is deleted. (Is this caused
the memory leak in one of our Linux buildbots since Build 2213?)

Powered by Google App Engine
This is Rietveld 408576698