Fix a crash when opening two terminal windows and closing the first one.
authorDima Ryazanov <dima@gmail.com>
Thu, 29 Nov 2012 08:27:09 +0000 (00:27 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 30 Nov 2012 19:11:41 +0000 (14:11 -0500)
commita85292e73c0bb9fca46e123c92c6f6550c57924d
tree486e1a7a55f9f090a5764e631fc23a0979178d2b
parentcd1d6c8f1994b0d055eba168a891f4e26837ae40
Fix a crash when opening two terminal windows and closing the first one.

To reproduce, launch the terminal, open a second window using Ctrl-Shift-N,
go back to the first window, and press Ctrl-D. The terminal's master FD gets
events even after being closed, causing terminal_destroy to be called twice
on the same object.

To fix this, I'm adding a function to stop watching an FD.
clients/terminal.c
clients/window.c
clients/window.h