diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-07-24 20:12:00 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-07-24 20:12:00 +0000 |
commit | 4f6f26bb5c2b9336c35d1634d32aa7f8a409cfbf (patch) | |
tree | e6bfd139ed5dacce17c12e5b2b0fcb760cb2cee8 /sys/dev | |
parent | bb7f2bb1da6878b638a7e702fddb091195ecdd67 (diff) |
When changing so that the client passes its stdout and stderr as well as
stdin up to the server, I forgot one essential point - the tmux server
could now be both the producer and consumer. This happens when tmux is
run inside tmux, as well as when piping tmux commands together.
So, using stdio(3) was a bad idea - if sufficient data was written, this
could block in write(2). When that happened and the server was both
producer and consumer, it deadlocks.
Change to use libevent bufferevents for the client stdin, stdout and
stderr instead. This is trivial enough for output but requires a
callback mechanism to trigger when stdin is finished.
This relies on the underlying polling mechanism for libevent to work
with whatever devices to which the user could redirect stdin, stdout or
stderr, hence the change to use poll(2) over kqueue(2) for tmux.
Diffstat (limited to 'sys/dev')
0 files changed, 0 insertions, 0 deletions