Repository navigation
Commit f2ec7be
committed
cmd: always create Stdin pipe when using a terminal in Start()
conpty has a known race condition when attaching a terminal to a starting
process that does not have a Stdin handle, causing the process to exit
immediately with a 0xc000013a (STATUS_CONTROL_C_EXIT) error. This is easily
noticed when launching a container using nerdctl in detached terminal mode
which uses BinaryIO where only the Stdout and Stderr handles are created for
the target process. Attempting to start a target process in this configuration
results in a process start success rate of less than 5%.
Since the race condition in conpty is unlikely to be fixed in the short
term, add a workaround to ensure that a Stdin handle is always created for
container processes launched with terminal mode enabled. This allows a
container started using nerdctl in detached terminal mode to always start
successfully.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>1 parent 4712998 commit f2ec7be
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
0 commit comments