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

Issue 21415003: Block signals while forking so they aren't run in the child process. (Closed)

Created:
7 years, 4 months ago by mdempsky_google
Modified:
7 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Block signals while forking so they aren't run in the child process. BUG=178450 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=215915

Patch Set 1 #

Total comments: 2

Patch Set 2 : Block all signals while forking, and remember to restore the original sigmask in the child after ca… #

Patch Set 3 : Revert no-longer-needed kSignalsToReset refactoring #

Total comments: 6

Patch Set 4 : Workaround Android's broken pthread_sigmask() #

Patch Set 5 : Fix branch upstream #

Patch Set 6 : Add CHECK for CLONE_THREAD/CLONE_VM suggested by Markus #

Total comments: 12

Patch Set 7 : Use RAW_CHECK as suggested by jln; cleanup SetSignalMask interface #

Total comments: 1

Patch Set 8 : Tweak comment #

Total comments: 2

Patch Set 9 : Check for CLONE_SIGHAND and add explanatory comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -0 lines) Patch
M base/process/launch_posix.cc View 1 2 3 4 5 6 7 8 4 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
mdempsky_google
7 years, 4 months ago (2013-07-31 23:19:04 UTC) #1
Markus (顧孟勤)
lgtm Looks great to me. But since jln was the one to file the bug, ...
7 years, 4 months ago (2013-07-31 23:35:01 UTC) #2
jln (very slow on Chromium)
https://codereview.chromium.org/21415003/diff/1/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://codereview.chromium.org/21415003/diff/1/base/process/launch_posix.cc#newcode87 base/process/launch_posix.cc:87: const int kSignalsToReset[] = { This ignores the other ...
7 years, 4 months ago (2013-07-31 23:54:55 UTC) #3
mdempsky_google
https://codereview.chromium.org/21415003/diff/1/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://codereview.chromium.org/21415003/diff/1/base/process/launch_posix.cc#newcode87 base/process/launch_posix.cc:87: const int kSignalsToReset[] = { On 2013/07/31 23:54:55, Julien ...
7 years, 4 months ago (2013-08-01 00:31:57 UTC) #4
Markus (顧孟勤)
lgtm https://codereview.chromium.org/21415003/diff/11001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://codereview.chromium.org/21415003/diff/11001/base/process/launch_posix.cc#newcode400 base/process/launch_posix.cc:400: if (pthread_sigmask(SIG_BLOCK, &full_sigset, &old_sigset) != 0) { In ...
7 years, 4 months ago (2013-08-01 01:20:54 UTC) #5
mdempsky_google
https://codereview.chromium.org/21415003/diff/11001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://codereview.chromium.org/21415003/diff/11001/base/process/launch_posix.cc#newcode400 base/process/launch_posix.cc:400: if (pthread_sigmask(SIG_BLOCK, &full_sigset, &old_sigset) != 0) { On 2013/08/01 ...
7 years, 4 months ago (2013-08-01 16:25:05 UTC) #6
mdempsky_google
On 2013/08/01 16:25:05, mdempsky wrote: > I expect sigfillset() + pthread_sigmask() should be safe, but ...
7 years, 4 months ago (2013-08-02 00:12:57 UTC) #7
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/21415003/diff/30001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://chromiumcodereview.appspot.com/21415003/diff/30001/base/process/launch_posix.cc#newcode430 base/process/launch_posix.cc:430: CHECK_EQ(0, options.clone_flags & (CLONE_THREAD | CLONE_VM)); RAW_CHECK https://chromiumcodereview.appspot.com/21415003/diff/30001/base/process/launch_posix.cc#newcode437 base/process/launch_posix.cc:437: ...
7 years, 4 months ago (2013-08-02 05:28:47 UTC) #8
mdempsky_google
https://chromiumcodereview.appspot.com/21415003/diff/30001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://chromiumcodereview.appspot.com/21415003/diff/30001/base/process/launch_posix.cc#newcode440 base/process/launch_posix.cc:440: NOTREACHED(); On 2013/08/02 05:28:47, Julien Tinnes wrote: > RAW_CHECK ...
7 years, 4 months ago (2013-08-02 16:12:51 UTC) #9
mdempsky_google
https://codereview.chromium.org/21415003/diff/30001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://codereview.chromium.org/21415003/diff/30001/base/process/launch_posix.cc#newcode430 base/process/launch_posix.cc:430: CHECK_EQ(0, options.clone_flags & (CLONE_THREAD | CLONE_VM)); On 2013/08/02 05:28:47, ...
7 years, 4 months ago (2013-08-02 18:45:00 UTC) #10
mdempsky_google
PTAL Should I add someone from base/OWNERS as a reviewer too?
7 years, 4 months ago (2013-08-05 21:23:38 UTC) #11
jln (very slow on Chromium)
lgtm I suggest mark@ as a good owner for this change. https://codereview.chromium.org/21415003/diff/42001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): ...
7 years, 4 months ago (2013-08-05 21:55:40 UTC) #12
mdempsky_google
+mark for base/OWNERS
7 years, 4 months ago (2013-08-05 22:03:43 UTC) #13
mdempsky_google
https://codereview.chromium.org/21415003/diff/42001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://codereview.chromium.org/21415003/diff/42001/base/process/launch_posix.cc#newcode420 base/process/launch_posix.cc:420: RAW_CHECK(!(options.clone_flags & (CLONE_THREAD | CLONE_VM))); On 2013/08/05 21:55:40, Julien ...
7 years, 4 months ago (2013-08-05 22:05:19 UTC) #14
Mark Mentovai
LGTM for base OWNERS review.
7 years, 4 months ago (2013-08-06 13:45:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mdempsky@google.com/21415003/52001
7 years, 4 months ago (2013-08-06 14:18:33 UTC) #16
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-08-06 14:26:17 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mdempsky@google.com/21415003/52001
7 years, 4 months ago (2013-08-06 16:38:06 UTC) #18
commit-bot: I haz the power
7 years, 4 months ago (2013-08-06 17:16:09 UTC) #19
Message was sent while issue was closed.
Change committed as 215915

Powered by Google App Engine
This is Rietveld 408576698