mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
tty state restored prior to printing nonzero exit status for interactive shell sessions
Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
parent
b4672deded
commit
5ad08fd3b3
1 changed files with 1 additions and 1 deletions
|
@ -697,7 +697,6 @@ func main() {
|
|||
fmt.Fprintln(os.Stderr, rejectUserMsg()) // nolint: errcheck
|
||||
rec.SetStatus(255)
|
||||
} else {
|
||||
|
||||
// Set up chaffing to server
|
||||
conn.SetupChaff(chaffFreqMin, chaffFreqMax, chaffBytesMax) // enable client->server chaffing
|
||||
if chaffEnabled {
|
||||
|
@ -729,6 +728,7 @@ func main() {
|
|||
}
|
||||
|
||||
if rec.Status() != 0 {
|
||||
_ = hkexsh.Restore(int(os.Stdin.Fd()), oldState) // nolint: errcheck,gosec
|
||||
fmt.Fprintln(os.Stderr, "Session exited with status:", rec.Status()) // nolint: errcheck
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue