summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/buffer-poll.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-09-02 23:49:26 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-09-02 23:49:26 +0000
commit3ccdbcac647b954dc66ffa0516d03435301bb981 (patch)
treec23a25b5703455940f0924ecea5c53ffaf1354da /usr.bin/tmux/buffer-poll.c
parent3310cc6df7f019fc74c83e0a444d02ef0f58ef79 (diff)
Fix a race condition when asking a client to take over the terminal (switching
to a different poll loop): If a MSG_READY was followed very quickly by a MSG_EXIT (for example if doing "tmux new 'exit'"), both messages could be read as part of the same imsg_read in the first client poll loop. The MSG_READY would then cause a switch to the second client loop, which would immediately call poll(2) again, causing the client to hang forever waiting for an exit message that it already had. Change to call imsg_get to process any existing messages before polling.
Diffstat (limited to 'usr.bin/tmux/buffer-poll.c')
0 files changed, 0 insertions, 0 deletions