Merge pull request #449 from hqhq/hq_enrich_runtime_linux

Add dev symbolic links in runtime_linux.md
This commit is contained in:
Michael Crosby 2016-06-01 10:10:31 -07:00
commit 3b166cd0c2
1 changed files with 12 additions and 2 deletions

View File

@ -1,8 +1,18 @@
# Linux Runtime
## File descriptors
By default, only the `stdin`, `stdout` and `stderr` file descriptors are kept open for the application by the runtime.
The runtime MAY pass additional file descriptors to the application to support features such as [socket activation](http://0pointer.de/blog/projects/socket-activated-containers.html).
Some of the file descriptors MAY be redirected to `/dev/null` even though they are open.
The runtime may pass additional file descriptors to the application to support features such as [socket activation](http://0pointer.de/blog/projects/socket-activated-containers.html).
## Dev symbolic links
Some of the file descriptors may be redirected to `/dev/null` even though they are open.
After the container has `/proc` mounted, the following standard symlinks MUST be setup within `/dev/` for the io.
| Source | Destination |
| --------------- | ----------- |
| /proc/self/fd | /dev/fd |
| /proc/self/fd/0 | /dev/stdin |
| /proc/self/fd/1 | /dev/stdout |
| /proc/self/fd/2 | /dev/stderr |