Skip to content

Commit 923dccb

Browse files
committed
Add extra file descriptors to Process
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
1 parent 7414f4d commit 923dccb

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [Se
9595
* **cwd** (string, optional) is the working directory that will be set for the executable.
9696
* **env** (array of strings, optional) contains a list of variables that will be set in the process's environment prior to execution. Elements in the array are specified as Strings in the form "KEY=value". The left hand side must consist solely of letters, digits, and underscores `_` as outlined in [IEEE Std 1003.1-2001](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html).
9797
* **args** (string, required) executable to launch and any flags as an array. The executable is the first element and must be available at the given path inside of the rootfs. If the executable path is not an absolute path then the search $PATH is interpreted to find the executable.
98+
* **extraFiles** (array of int, optional) contains a list of open file descriptors that are passed to the process.
9899

99100
The user for the process is a platform-specific structure that allows specific control over which user the process runs as.
100101
For Linux-based systems the user structure has the following fields:

spec.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package specs
22

3+
import (
4+
"os"
5+
)
6+
37
// Spec is the base configuration for the container. It specifies platform
48
// independent configuration.
59
type Spec struct {
@@ -53,6 +57,8 @@ type Process struct {
5357
// Cwd is the current working directory for the process and must be
5458
// relative to the container's root.
5559
Cwd string `json:"cwd"`
60+
// ExtraFiles specifies open file descriptors that should be passed to the process.
61+
ExtraFiles []os.File `json:"extraFiles"`
5662
}
5763

5864
// Root contains information about the container's root filesystem on the host.

0 commit comments

Comments
 (0)