zellij/zellij-client/src
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
..
unit Fix double panic lockup in clients panic handler (#1433) 2022-05-24 14:10:37 +02:00
command_is_executing.rs Big refactor: separate crates for client, server and utilities 2021-05-16 21:41:56 +05:30
input_handler.rs fix(compatibility): respond to bg and fg color ansi queries (#1358) 2022-04-28 17:26:44 +02:00
lib.rs Fix double panic lockup in clients panic handler (#1433) 2022-05-24 14:10:37 +02:00
os_input_output.rs Fix double panic lockup in clients panic handler (#1433) 2022-05-24 14:10:37 +02:00
stdin_ansi_parser.rs fix(input): ANSI code sent to terminal on startup and resize 2022-05-16 15:32:17 +02:00
stdin_handler.rs fix(mouse): improve mouse event reporting (#1329) 2022-04-30 18:46:17 +02:00