aerc/widgets
Koni Marti 1bac87e804 terminal: fix race when closing a terminal
Fix race when closing a terminal. The race appears as a nil pointer
dereference panic in pty.StartWithAttrs when trying to access the
provided term.cmd variable.

Before calling pty.StartwithAttrs in the Terminal.Draw function,
term.cmd is checked for nil. Terminal.Close must be called concurrently
right after this check and before/while entering pty.StartWithAttrs.
This can be avoided with a mutex.

Link: https://github.com/creack/pty/issues/146
Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CCJ2I45HMOTGD.2J1QMEJ4T1E3N%40t450.arielp.com%3E#%3CCJ3D069RCTXL.3VEZ7JIGFHOHK@Archetype%3E
Fixes: https://todo.sr.ht/~rjarry/aerc/38
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-05-23 22:31:15 +02:00
..
account-wizard.go logging: fix race condition in startup 2022-03-24 12:37:53 +01:00
account.go statusline: refactor to make it more customizable 2022-04-25 11:21:07 +02:00
aerc.go refactor: refactor pgp implementation 2022-04-27 09:46:11 +02:00
common.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
compose.go pgp: add attach key command 2022-05-06 11:02:55 +02:00
dirlist.go dirlist: add format specifier to compact folder name 2022-04-29 13:41:38 +02:00
dirtree.go style: add style config options for dirlist_unread and dirlist_recent 2022-04-27 09:46:06 +02:00
exline.go completions: add support for completing multiple addresses 2022-01-07 13:54:10 +01:00
getpasswd.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
headerlayout.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
msglist.go refactor: refactor pgp implementation 2022-04-27 09:46:11 +02:00
msgviewer.go refactor: refactor pgp implementation 2022-04-27 09:46:11 +02:00
pgpinfo.go refactor: refactor pgp implementation 2022-04-27 09:46:11 +02:00
providesmessage.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
scrollable.go scrollable: extract scrolling behavior for reuse 2022-03-03 21:11:05 +01:00
selector.go ui: fix panic in selector when resizing terminal 2022-05-08 18:36:49 +02:00
spinner.go logging: added a log on panic 2022-03-23 20:56:09 +01:00
status.go status: use contextual ui styleset for statusline 2022-04-17 12:18:29 +02:00
tabhost.go Implement style configuration. 2020-08-06 21:42:06 +02:00
terminal.go terminal: fix race when closing a terminal 2022-05-23 22:31:15 +02:00