Chromium Code Reviews| Index: runtime/bin/process_impl.dart |
| =================================================================== |
| --- runtime/bin/process_impl.dart (revision 2981) |
| +++ runtime/bin/process_impl.dart (working copy) |
| @@ -10,7 +10,7 @@ |
| class _Process implements Process { |
| - _Process.start(String path, List<String> arguments) { |
| + _Process.start(String path, List<String> arguments, [String workingDirectory]) { |
|
Søren Gjesse
2012/01/05 09:30:47
Ling line, do either
_Process.start(
String p
Anders Johnsen
2012/01/05 09:50:49
Done.
|
| if (path is !String) { |
| throw new ProcessException("Path is not a String: $path"); |
| } |
| @@ -29,6 +29,12 @@ |
| _arguments[i] = arguments[i]; |
| } |
| + if (workingDirectory is !String && workingDirectory !== null) { |
| + throw new ProcessException( |
| + "WorkingDirectory is not a String: $workingDirectory"); |
| + } |
| + _workingDirectory = workingDirectory; |
| + |
| _in = new _Socket._internalReadOnly(); // stdout coming from process. |
| _out = new _Socket._internalWriteOnly(); // stdin going to process. |
| _err = new _Socket._internalReadOnly(); // stderr coming from process. |
| @@ -52,7 +58,8 @@ |
| void start() { |
| var status = new _ProcessStartStatus(); |
| bool success = _start( |
|
Søren Gjesse
2012/01/05 09:30:47
When all arguments cannot fit on one line they sho
Anders Johnsen
2012/01/05 09:50:49
Nice to know, ty!
|
| - _path, _arguments, _in, _out, _err, _exitHandler, status); |
| + _path, _arguments, _workingDirectory, _in, _out, _err, _exitHandler, |
| + status); |
| if (!success) { |
| close(); |
| if (_errorHandler !== null) { |
| @@ -106,6 +113,7 @@ |
| bool _start(String path, |
| List<String> arguments, |
| + String workingDirectory, |
| Socket input, |
| Socket output, |
| Socket error, |
| @@ -187,6 +195,7 @@ |
| String _path; |
| ObjectArray<String> _arguments; |
| + String _workingDirectory; |
| Socket _in; |
| Socket _out; |
| Socket _err; |