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

Unified Diff: runtime/bin/process_impl.dart

Issue 9307003: Changes to the process implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update stable test binaries Created 8 years, 11 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 | « runtime/bin/process.cc ('k') | runtime/bin/process_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_impl.dart
diff --git a/runtime/bin/process_impl.dart b/runtime/bin/process_impl.dart
index cbbc3879a4a48e40c8babb1867e6d2da817dcf79..82ccc64d9ded31f78c0c6d1217f5036efb3e2c54 100644
--- a/runtime/bin/process_impl.dart
+++ b/runtime/bin/process_impl.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -86,23 +86,18 @@ class _Process implements Process {
// Setup an exit handler to handle internal cleanup and possible
// callback when a process terminates.
_exitHandler.inputStream.dataHandler = () {
- final int EXIT_DATA_SIZE = 12;
+ final int EXIT_DATA_SIZE = 8;
List<int> exitDataBuffer = new List<int>(EXIT_DATA_SIZE);
int exitDataRead = 0;
int exitCode(List<int> ints) {
- var code = _intFromBytes(ints, 4);
- var negative = _intFromBytes(ints, 8);
+ var code = _intFromBytes(ints, 0);
+ var negative = _intFromBytes(ints, 4);
assert(negative == 0 || negative == 1);
return (negative == 0) ? code : -code;
}
- int exitPid(List<int> ints) {
- return _intFromBytes(ints, 0);
- }
-
void handleExit() {
- _processExit(exitPid(exitDataBuffer));
if (_exitHandlerCallback !== null) {
_exitHandlerCallback(exitCode(exitDataBuffer));
}
@@ -127,8 +122,6 @@ class _Process implements Process {
Socket exitHandler,
_ProcessStartStatus status) native "Process_Start";
- void _processExit(int pid) native "Process_Exit";
-
InputStream get stdout() {
if (_closed) {
throw new ProcessException("Process closed");
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/bin/process_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698