Commit ae64c17
committed
fix(flush_stdin): use deep copy for termios settings
The previous implementation used list(old) which creates a shallow copy.
Since old[6] (the cc array) is itself a list, both old[6] and new[6]
pointed to the same object. Modifying new[6][VMIN] and new[6][VTIME]
also corrupted old[6], making the restore at the end ineffective.
This fix uses a comprehension that copies nested lists, ensuring the
original termios settings are preserved for proper restoration.
Co-authored-by: openhands <openhands@all-hands.dev>1 parent 012422c commit ae64c17
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| |||
0 commit comments