aboutsummaryrefslogtreecommitdiff
path: root/paste.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-02 23:49:25 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-02 23:49:25 +0000
commit751a2fa915bc73e45e4914a26ddb3d1cb3e6a653 (patch)
tree9ee1d06da25600ce81f74e6f729f781d6e6092b7 /paste.c
parent81a457e6fb169141fe567feb7bf70f98a8ad6c2a (diff)
downloadrtmux-751a2fa915bc73e45e4914a26ddb3d1cb3e6a653.tar.gz
rtmux-751a2fa915bc73e45e4914a26ddb3d1cb3e6a653.tar.bz2
rtmux-751a2fa915bc73e45e4914a26ddb3d1cb3e6a653.zip
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 'paste.c')
0 files changed, 0 insertions, 0 deletions