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

Issue 8267006: Make sure that the named pipe created for signalling the exit code is not inheritable (Closed)

Created:
9 years, 2 months ago by Søren Gjesse
Modified:
9 years, 2 months ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Make sure that the named pipe created for signalling the exit code is not inheritable R=ager@google.com Committed: https://code.google.com/p/dart/source/detail?r=396

Patch Set 1 #

Total comments: 10

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -33 lines) Patch
M bin/process_win.cc View 1 8 chunks +49 lines, -33 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Gjesse
9 years, 2 months ago (2011-10-13 12:02:08 UTC) #1
Mads Ager (google)
LGTM with comments. http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc File bin/process_win.cc (right): http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc#newcode87 bin/process_win.cc:87: // NOTE: If this function returns ...
9 years, 2 months ago (2011-10-13 12:40:35 UTC) #2
Søren Gjesse
9 years, 2 months ago (2011-10-13 13:33:10 UTC) #3
http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc
File bin/process_win.cc (right):

http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc#newcode87
bin/process_win.cc:87: // NOTE: If this function returns false the handled might
have been allocated
On 2011/10/13 12:40:35, Mads Ager wrote:
> handled -> handles

Done.

http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc#newcode88
bin/process_win.cc:88: // and the caller should make sure to close then in case
of an error.
On 2011/10/13 12:40:35, Mads Ager wrote:
> then -> them

Done.

http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc#newcode126
bin/process_win.cc:126: } else if (type == kInheritWrite) {
On 2011/10/13 12:40:35, Mads Ager wrote:
> InheritWrite and InheritNone are identical except for the pointer to a
security
> structure. Maybe extract a method?

Combined the two and used a conditional for the security descriptor argument.

http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc#newcode253
bin/process_win.cc:253: CloseProcessPipe(stdin_handles);
On 2011/10/13 12:40:35, Mads Ager wrote:
> Can't you abstract all of these closing parts into one method that take
pointers
> to the handle arrays and close any non-INVALID_HANDLE_VALUE handles?

Done.

http://codereview.chromium.org/8267006/diff/1/bin/process_win.cc#newcode275
bin/process_win.cc:275: if (!CreateProcessPipe(exit_handles, pipe_name,
kInheritNone)) {
On 2011/10/13 12:40:35, Mads Ager wrote:
> kDontInheritWrite?
> 
> Or maybe kReadInherit, kWriteInherit, kWrite?
> 
> I would like to have the word write appear here somewhere. You are creating
the
> process pipe for writing.

The pipe is always created with both read and write ends. The type only
specifies whether one of these ends should be inheritable by the child. So I
think the current names are OK.

Powered by Google App Engine
This is Rietveld 408576698