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 20:01:14 +0000 (15:01 -0500)
commitaeb10f85220fb6e50cace2cfdd48c94b28a4b92a
tree0b2081524410a01a5ac0f5c6b0026a8e229feda0
parentb4dc3f0bc4ff9b9ea1f960cbcf5a0bae51f1ae64
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