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

Unified Diff: sdk/lib/io/process.dart

Issue 798743004: Add support for starting a detached process (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 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 | « sdk/lib/_internal/compiler/js_lib/io_patch.dart ('k') | tests/standalone/io/process_detached_script.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/process.dart
diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart
index de3b0e5e63e2578896f55ef59925b56a9583fc63..a977b319b6173dd8bfe70d0cf62bfb952217c7ad 100644
--- a/sdk/lib/io/process.dart
+++ b/sdk/lib/io/process.dart
@@ -241,7 +241,7 @@ abstract class Process {
* include the parent process's environment, with [environment] taking
* precedence. Default is `true`.
*
- * If [runInShell] is true, the process will be spawned through a system
+ * If [runInShell] is `true`, the process will be spawned through a system
* shell. On Linux and Mac OS, [:/bin/sh:] is used, while
* [:%WINDIR%\system32\cmd.exe:] is used on Windows.
*
@@ -257,6 +257,13 @@ abstract class Process {
* stdout.addStream(process.stdout);
* stderr.addStream(process.stderr);
* });
+ *
+ * If [detach] is `true` a detached process will be created. A
+ * detached process has no connection to its parent, and can
+ * keep running on its own when the parent dies. The only
+ * information available from a detached process is its `pid`. There
+ * is no connection to its `stdin`, `stdout` or `stderr` nor will its
+ * exit code become available when it terminates.
*/
external static Future<Process> start(
String executable,
@@ -264,7 +271,8 @@ abstract class Process {
{String workingDirectory,
Map<String, String> environment,
bool includeParentEnvironment: true,
- bool runInShell: false});
+ bool runInShell: false,
+ bool detach: false});
/**
* Starts a process and runs it non-interactively to completion. The
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/io_patch.dart ('k') | tests/standalone/io/process_detached_script.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698