2017-04-12 23:12:04 +00:00
|
|
|
# <a name="linuxRuntime" />Linux Runtime
|
2017-02-01 00:45:59 +00:00
|
|
|
|
2017-04-12 23:12:04 +00:00
|
|
|
## <a name="runtimeLinuxFileDescriptors" />File descriptors
|
2017-02-01 00:45:59 +00:00
|
|
|
|
|
|
|
By default, only the `stdin`, `stdout` and `stderr` file descriptors are kept open for the application by the runtime.
|
2017-04-12 23:12:04 +00:00
|
|
|
The runtime MAY pass additional file descriptors to the application to support features such as [socket activation][socket-activated-containers].
|
2017-02-01 00:45:59 +00:00
|
|
|
Some of the file descriptors MAY be redirected to `/dev/null` even though they are open.
|
|
|
|
|
2017-04-12 23:12:04 +00:00
|
|
|
## <a name="runtimeLinuxDevSymbolicLinks" /> Dev symbolic links
|
2017-02-01 00:45:59 +00:00
|
|
|
|
2017-04-12 23:12:04 +00:00
|
|
|
After the container has `/proc` mounted, the following standard symlinks MUST be setup within `/dev/` for the IO.
|
2017-02-01 00:45:59 +00:00
|
|
|
|
|
|
|
| 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 |
|
2017-04-12 23:12:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
[socket-activated-containers]: http://0pointer.de/blog/projects/socket-activated-containers.html
|