flowtop: Don't init screen until collector is ready
commit451275470106024f106a310a5af050b3ca046a4f
authorVadim Kochan <vadim4j@gmail.com>
Thu, 19 Mar 2015 00:02:44 +0000 (19 02:02 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Fri, 20 Mar 2015 16:53:15 +0000 (20 17:53 +0100)
tree291cfa92cf4e06a0d3a10e7721a3913c2ec90538
parent3dfaab495b62658b88a1ed201b2ed61aea34570d
flowtop: Don't init screen until collector is ready

In case if main thread already initialized screen but then collector
called panic, the process exits but console stays with the same colored
screen and shifted shell prompt.

Fixed by adding conditional variable locking.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
flowtop.c
locking.h