Commit fc9d817
committed
fix(exec): set initial console size before nsenter exec
The child's slave.set_size({}) after setsid was a no-op
(/dev/tty == slave, reads 0x0 writes 0x0) so the pty stayed at
0x0 until the first SIGWINCH. Drop it and only set size when
consoleSize is given. On the parent side, after receiving the
master fd, resize it from the host terminal before attaching
(unless consoleSize was set). Accept the small race window:
the parent's single ioctl lands within the child's
send_fd→execvpe window in practice.
Signed-off-by: Yuming He <ComixHe1895@outlook.com>1 parent 8cf650c commit fc9d817
1 file changed
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 153 | + | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
166 | | - | |
167 | | - | |
| 171 | + | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
| |||
0 commit comments