| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module native_support; | 6 module native_support; |
| 7 | 7 |
| 8 import "files/public/interfaces/file.mojom"; | 8 import "files/interfaces/file.mojom"; |
| 9 import "files/public/interfaces/types.mojom"; | 9 import "files/interfaces/types.mojom"; |
| 10 | 10 |
| 11 // Interface for dealing with (e.g., starting) "native" processes. | 11 // Interface for dealing with (e.g., starting) "native" processes. |
| 12 interface Process { | 12 interface Process { |
| 13 // Spawns a process, optionally redirecting stdin/stdout/stderr from/to the | 13 // Spawns a process, optionally redirecting stdin/stdout/stderr from/to the |
| 14 // corresponding |mojo.files.File| (if null, redirects from/to /dev/null). | 14 // corresponding |mojo.files.File| (if null, redirects from/to /dev/null). |
| 15 // |path| is the path to the binary to execute; |argv| is the argv to give to | 15 // |path| is the path to the binary to execute; |argv| is the argv to give to |
| 16 // the process (if null, it just takes |argv[0]| to be |path| with no other | 16 // the process (if null, it just takes |argv[0]| to be |path| with no other |
| 17 // arguments); |envp| is the environment to give to the process, consisting of | 17 // arguments); |envp| is the environment to give to the process, consisting of |
| 18 // an array of strings of the form "NAME=value" (if null, simply inherits the | 18 // an array of strings of the form "NAME=value" (if null, simply inherits the |
| 19 // environment from the parent, whatever that is). | 19 // environment from the parent, whatever that is). |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // Kill the process with the given signal (note: does not wait). |signal| | 56 // Kill the process with the given signal (note: does not wait). |signal| |
| 57 // should be nonnegative. This is not valid after a successful call to | 57 // should be nonnegative. This is not valid after a successful call to |
| 58 // |Wait()|. | 58 // |Wait()|. |
| 59 // TODO(vtl): Add constants for signals. (For standard POSIX signals, the | 59 // TODO(vtl): Add constants for signals. (For standard POSIX signals, the |
| 60 // values should be the same as the POSIX-specified values, so using POSIX | 60 // values should be the same as the POSIX-specified values, so using POSIX |
| 61 // macros for the values should always be OK.) | 61 // macros for the values should always be OK.) |
| 62 Kill(int32 signal) => (mojo.files.Error error); | 62 Kill(int32 signal) => (mojo.files.Error error); |
| 63 | 63 |
| 64 // TODO(vtl): Add a "Detach()"? | 64 // TODO(vtl): Add a "Detach()"? |
| 65 }; | 65 }; |
| OLD | NEW |