zellij/zellij-client
raphCode eab464b11a
Fix double panic lockup in clients panic handler (#1433)
* Fix possible lockup in the clients panic handler

When the pty the client was running in disappears, reading from stdin
causes a panic, which triggers the custom panic handler. This handler
attempts to print a backtrace to the terminal and tries to unset the raw
mode for that. Since the pty has already disappeared, the tcsetattr call
fails and causes a second panic, which locks everything up.

This commit fixes this by returning an Result from the unset_raw_mode
function, allowing the calling panic handler to handle any error
gracefully.

* Log any client panics to file

Since we are now aware of the fact that panics may happen / are handled
after the pty has disappeared, logging them to file seems useful: there
is no other other place to show them to the user.

* fix tests and improve function return type
2022-05-24 14:10:37 +02:00
..
src Fix double panic lockup in clients panic handler (#1433) 2022-05-24 14:10:37 +02:00
Cargo.toml build(deps): bump log from 0.4.16 to 0.4.17 (#1386) 2022-05-09 18:32:36 +02:00