Commit 69b7335
Make Pipe.setCurrentPipe public to fix interruption handling in nested shells
This change makes the setCurrentPipe method in the Pipe class public to allow proper handling of interruption signals in nested shells. This is needed to fix an issue in JLine where Ctrl+C doesn't properly interrupt commands running in a nested shell.
The issue occurs when a user starts a shell session, then runs the 'sh' command to create a nested shell, and then runs a command like 'ttop' in that nested shell. When the user presses Ctrl+C to interrupt the 'ttop' command, the interruption signal is caught by the parent shell but not properly propagated to the child shell.
By making setCurrentPipe public, we allow the nested shell to clear the current pipe before creating a child shell and restore it afterward, ensuring that interruption signals are properly propagated.
See: jline/jline3#11431 parent d95c1ae commit 69b7335
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
| |||
0 commit comments