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

Unified Diff: runtime/bin/process_patch.dart

Issue 300883002: Add Proces owner of socket and fix printing of non-network sockets (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/service_object_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_patch.dart
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index c1f483ea088eae34102aa52101219600f0a117d8..a165f93522d2a12795b0ce69ea1cdfea3dbbf7fa 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -230,10 +230,13 @@ class _ProcessImpl extends _ProcessImplNativeWrapper with _ServiceObject
// stdin going to process.
_stdin = new _StdSink(new _Socket._writePipe());
+ _stdin._sink._owner = this;
// stdout coming from process.
_stdout = new _StdStream(new _Socket._readPipe());
+ _stdout._stream._owner = this;
// stderr coming from process.
_stderr = new _StdStream(new _Socket._readPipe());
+ _stderr._stream._owner = this;
_exitHandler = new _Socket._readPipe();
_ended = false;
_started = false;
@@ -259,6 +262,15 @@ class _ProcessImpl extends _ProcessImplNativeWrapper with _ServiceObject
r['path'] = _path;
r['environment'] = _environment;
r['workingDirectory'] = _workingDirectory == null ? '.' : _workingDirectory;
+ if (_stdin._sink._nativeSocket.owner != null) {
+ r['stdin'] = _stdin._sink._nativeSocket._toJSON(true);
+ }
+ if (_stdout._stream._nativeSocket.owner != null) {
+ r['stdout'] = _stdout._stream._nativeSocket._toJSON(true);
+ }
+ if (_stderr._stream._nativeSocket.owner != null) {
+ r['stderr'] = _stderr._stream._nativeSocket._toJSON(true);
+ }
return r;
}
« no previous file with comments | « no previous file | runtime/bin/service_object_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698