diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-05-23 22:16:13 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-05-23 22:31:15 +0200 |
commit | 1bac87e80414f8e787c54f7f4cd2a3920aa1a095 (patch) | |
tree | 0df1fb7d749b2d91b15cf1a45d1d9560c0014100 /lib/dirstore.go | |
parent | f4d4e2b4e1733c1c5257a54e2fa9de2a2a2f5f28 (diff) | |
download | aerc-1bac87e80414f8e787c54f7f4cd2a3920aa1a095.tar.gz |
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>
Diffstat (limited to 'lib/dirstore.go')
0 files changed, 0 insertions, 0 deletions