Commit e9281c6
devices/console: Fix a bug which would cause libkrun to hang on exit
Make PortInputEmpty and PortInputSigInt `wait_until_readable` implementations
poll the stopfd EventFd to ensure the thread eventually exits.
(The thread is joined in Port::shutdown method causing the hang).
To replicate the hang, the stdin must not be a terminal. For example you can use
a pipe - `echo hello | ./chroot_vm rootfs_fedora /bin/cat` would hang without
this fix.
This seems to be a regresion introduced by the commit:
4076b7: devices/console: implement reset method
Signed-off-by: Matej Hrica <[email protected]>1 parent 57a5a6b commit e9281c6
1 file changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
231 | 236 | | |
232 | 237 | | |
233 | 238 | | |
| |||
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
254 | | - | |
255 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
256 | 266 | | |
257 | 267 | | |
0 commit comments