2016-11-30 16:38:46 -08:00
# <a name="linuxRuntime" />Linux Runtime
2015-09-10 14:36:13 -04:00
2016-11-30 16:38:46 -08:00
## <a name="runtimeLinuxFileDescriptors" />File descriptors
2015-08-21 14:45:39 -04:00
2016-05-24 14:43:30 +08:00
By default, only the `stdin` , `stdout` and `stderr` file descriptors are kept open for the application by the runtime.
2017-02-09 15:32:39 -05:00
The runtime MAY pass additional file descriptors to the application to support features such as [socket activation][socket-activated-containers].
2016-05-24 14:43:30 +08:00
Some of the file descriptors MAY be redirected to `/dev/null` even though they are open.
2016-05-24 15:05:08 +08:00
2016-11-30 16:38:46 -08:00
## <a name="runtimeLinuxDevSymbolicLinks" /> Dev symbolic links
2016-05-24 15:05:08 +08:00
2017-03-16 15:14:02 -07:00
While creating the container (step 2 in the [lifecycle ](runtime.md#lifecycle )), runtimes MUST create the following symlinks if the source file exists after processing [`mounts` ](config.md#mounts ):
2016-05-24 15:05:08 +08: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-02-09 15:32:39 -05:00
2024-11-04 12:25:33 +01:00
[socket-activated-containers]: https://0pointer.de/blog/projects/socket-activated-containers.html