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

Issue 18031003: Stop printing when stdout is closed. (Closed)

Created:
7 years, 6 months ago by Anders Johnsen
Modified:
7 years, 5 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Stop printing when stdout is closed. This makes sure we don't print(...) data to a file opened after stdout was closed. BUG=https://code.google.com/p/dart/issues/detail?id=9615 R=kustermann@google.com, whesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=24525

Patch Set 1 #

Patch Set 2 : Fix test. #

Patch Set 3 : New approach not using volatile. #

Patch Set 4 : Clean up test. #

Total comments: 8

Patch Set 5 : Use dup2 #

Total comments: 6

Patch Set 6 : Add include for all platforms and don't leak fds. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -3 lines) Patch
M runtime/bin/eventhandler_android.cc View 1 2 3 4 5 2 chunks +10 lines, -1 line 1 comment Download
M runtime/bin/eventhandler_linux.cc View 1 2 3 4 5 2 chunks +10 lines, -1 line 0 comments Download
M runtime/bin/eventhandler_macos.cc View 1 2 3 4 5 2 chunks +10 lines, -1 line 0 comments Download
A tests/standalone/io/stdout_close_test.dart View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Anders Johnsen
7 years, 6 months ago (2013-06-27 11:03:54 UTC) #1
Anders Johnsen
Hang on, I'll have to fix the volatile stuff. I was thinking about the Java ...
7 years, 6 months ago (2013-06-27 11:08:34 UTC) #2
Anders Johnsen
PTAL
7 years, 5 months ago (2013-06-27 11:31:26 UTC) #3
kustermann
In general I like the idea of using "/dev/null" as a placeholder if we close ...
7 years, 5 months ago (2013-06-27 11:51:09 UTC) #4
Anders Johnsen
Thanks for the feedback Martin, much better now! PTAL https://codereview.chromium.org/18031003/diff/7001/runtime/bin/eventhandler_android.cc File runtime/bin/eventhandler_android.cc (right): https://codereview.chromium.org/18031003/diff/7001/runtime/bin/eventhandler_android.cc#newcode220 runtime/bin/eventhandler_android.cc:220: ...
7 years, 5 months ago (2013-06-27 14:45:52 UTC) #5
kustermann
lgtm with comments. But let the more experienced IO guys take a look as well. ...
7 years, 5 months ago (2013-06-27 15:14:07 UTC) #6
Anders Johnsen
Bill, can you take a look. Martin, thanks a ton for the reviews! https://codereview.chromium.org/18031003/diff/13001/runtime/bin/eventhandler_android.cc File ...
7 years, 5 months ago (2013-06-27 16:32:07 UTC) #7
Bill Hesse
lgtm https://codereview.chromium.org/18031003/diff/13001/runtime/bin/eventhandler_android.cc File runtime/bin/eventhandler_android.cc (right): https://codereview.chromium.org/18031003/diff/13001/runtime/bin/eventhandler_android.cc#newcode221 runtime/bin/eventhandler_android.cc:221: } else { Shouldn't you be checking that ...
7 years, 5 months ago (2013-06-27 16:42:36 UTC) #8
Anders Johnsen
Yep :) https://codereview.chromium.org/18031003/diff/13001/runtime/bin/eventhandler_android.cc File runtime/bin/eventhandler_android.cc (right): https://codereview.chromium.org/18031003/diff/13001/runtime/bin/eventhandler_android.cc#newcode221 runtime/bin/eventhandler_android.cc:221: } else { On 2013/06/27 16:42:36, Bill ...
7 years, 5 months ago (2013-06-27 16:44:11 UTC) #9
Anders Johnsen
7 years, 5 months ago (2013-06-27 16:44:48 UTC) #10
Message was sent while issue was closed.
Committed patchset #6 manually as r24525 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698