In some setup closing the xterm window only has the effect of deleting the pty.
commite4f707330c7bc39afc9cd211b731eb4af2172d9c
authorGuillaume Chazarain <guichaz@gmail.com>
Sun, 26 May 2013 16:04:56 +0000 (26 18:04 +0200)
committerGuillaume Chazarain <guichaz@gmail.com>
Sun, 26 May 2013 16:05:39 +0000 (26 18:05 +0200)
treebdbbb5b716701f82e46bf91c299fbab480078224
parentadce8cc314f3bde11badc4b02c1e3987243b1605
In some setup closing the xterm window only has the effect of deleting the pty.
Then iotop would be busy looping reading on stdin. Instead we should detect the
terminal deletion and exit.
When this happens iotop receives (0, 25) as an event, which is
(stdin, select.POLLIN|select.POLLERR|select.POLLHUP).

Also, represent an empty even list as [] instead of 0, this is just cosmetic.
iotop/ui.py