Commit Graph

4745 Commits

Author SHA1 Message Date
Nicholas Marriott
f54482a461 Solaris 9 has no stdint.h, ugh. Reported by a couple of people most
recently Timothy Larson.
2010-09-07 19:32:58 +00:00
Tiago Cunha
afcc29a51d Sync OpenBSD patchset 757:
Simplify xterm modifier detection by treating as a bitmask + 1. Spotted
by and diff from Emanuele Giaquinta.
2010-09-07 13:21:18 +00:00
Tiago Cunha
33df467d40 Sync OpenBSD patchset 756:
Reset running jobs when the status line is enabled or disabled as well,
some people have it bound to a key.
2010-09-07 13:20:28 +00:00
Tiago Cunha
510b43569f Sync OpenBSD patchset 755:
Add missing prototype.
2010-09-07 13:19:53 +00:00
Nicholas Marriott
de68c2a7da Simplify xterm modifier detection by treating as a bitmask + 1. Spotted
by and diff from Emanuele Giaquinta.
2010-09-01 21:11:14 +00:00
Nicholas Marriott
5309252053 Reset running jobs when the status line is enabled or disabled as well,
some people have it bound to a key.
2010-09-01 21:06:51 +00:00
Nicholas Marriott
a8b22d3673 +. 2010-09-01 20:39:32 +00:00
Nicholas Marriott
19923625d4 +. 2010-09-01 20:37:20 +00:00
Nicholas Marriott
8e8e0f1d53 Add missing prototype. 2010-08-31 22:46:59 +00:00
Nicholas Marriott
3b4d26d16b +. 2010-08-31 22:44:01 +00:00
Tiago Cunha
01052ca38e Sync OpenBSD patchset 754:
When destroying a pane, reset any mode (which reenables pane
bufferevent) before freeing the bufferevent.
2010-08-29 14:46:13 +00:00
Tiago Cunha
ee44a8dca9 Sync OpenBSD patchset 753:
Can't call event_del() without event_set() first - so call event_set()
when setting up the client.
2010-08-29 14:44:55 +00:00
Tiago Cunha
89acd757d0 Sync OpenBSD patchset 752:
MSG_EXIT can now have a return code in the message, so check for that
size as well. Stops the client fatal()ing on exit.
2010-08-29 14:43:45 +00:00
Tiago Cunha
56040be346 Sync OpenBSD patchset 751:
Do not call event_del() for signals after fork(), just use sigaction()
directly instead - calling libevent functions after fork() w/o
event_reinit() is a bad idea, even if in this case it was harmless.
2010-08-29 14:42:11 +00:00
Tiago Cunha
e6bb3d6942 Sync OpenBSD patchset 750:
Do not need to dup() the tty fd sent from the client because it is
already dup()d again later. Fixes a leak seen by espie@.
2010-08-29 14:39:45 +00:00
Nicholas Marriott
f69ce39a6c When destroying a pane, reset any mode (which reenables pane
bufferevent) before freeing the bufferevent.
2010-08-25 19:19:43 +00:00
Nicholas Marriott
fc9f08235b Can't call event_del() without event_set() first - so call event_set()
when setting up the client.
2010-08-23 17:36:32 +00:00
Nicholas Marriott
5f5104e782 MSG_EXIT can now have a return code in the message, so check for that
size as well. Stops the client fatal()ing on exit.
2010-08-22 16:09:49 +00:00
Nicholas Marriott
e3be9b1951 Do not call event_del() for signals after fork(), just use sigaction()
directly instead - calling libevent functions after fork() w/o
event_reinit() is a bad idea, even if in this case it was harmless.
2010-08-19 18:29:01 +00:00
Nicholas Marriott
aba555509e +-. 2010-08-19 18:04:56 +00:00
Nicholas Marriott
c2822ca119 Do not need to dup() the tty fd sent from the client because it is
already dup()d again later. Fixes a leak seen by espie@.
2010-08-19 17:20:26 +00:00
Tiago Cunha
c50c4ec834 Sync OpenBSD patchset 749:
Do not allow duplicate session names to be created, reported by Dominik
Honnef, patch from Thomas Adam.
2010-08-11 22:19:03 +00:00
Tiago Cunha
9858071dd0 Sync OpenBSD patchset 748:
Handle failure to change mode, to avoid dying when switching into copy
mode when already in a different mode. Reported by "Florian".
2010-08-11 22:18:28 +00:00
Tiago Cunha
b0169d9b84 Sync OpenBSD patchset 747:
Usage string fixes from Ben Boeckel.
2010-08-11 22:17:32 +00:00
Tiago Cunha
e34c6e2305 Sync OpenBSD patchset 746:
Treat trying to link or move to the same window as an error to avoid
removing it accidentally.
2010-08-11 22:16:43 +00:00
Tiago Cunha
761bd3c9e3 Sync OpenBSD patchset 745:
Change the way backoff works. Instead of stopping reading from the pty
when the client tty backs up too much, just stop updating the tty and
only update the internal screen. Then when the tty recovers, force a
redraw.

This prevents a dodgy client from causing other clients to go into
backoff while still allowing tmux to be responsive (locally) when seeing
lots of output.
2010-08-11 22:16:04 +00:00
Tiago Cunha
5e9429e2d6 Sync OpenBSD patchset 744:
Show which pane is active in the list-panes output, suggested by Dominik
Honnef.
2010-08-11 22:14:23 +00:00
Nicholas Marriott
828f12b748 Do not allow duplicate session names to be created, reported by Dominik
Honnef, patch from Thomas Adam.
2010-08-11 07:45:06 +00:00
Nicholas Marriott
ae70071494 Handle failure to change mode, to avoid dying when switching into copy
mode when already in a different mode. Reported by "Florian".
2010-08-11 07:41:05 +00:00
Nicholas Marriott
3999886901 Usage string fixes from Ben Boeckel. 2010-08-11 07:38:00 +00:00
Nicholas Marriott
cc474b4ede Treat trying to link or move to the same window as an error to avoid
removing it accidentally.
2010-08-11 07:36:23 +00:00
Nicholas Marriott
8363e31953 Change the way backoff works. Instead of stopping reading from the pty
when the client tty backs up too much, just stop updating the tty and
only update the internal screen. Then when the tty recovers, force a
redraw.

This prevents a dodgy client from causing other clients to go into
backoff while still allowing tmux to be responsive (locally) when seeing
lots of output.
2010-08-11 07:34:43 +00:00
Nicholas Marriott
933dc48de3 Show which pane is active in the list-panes output, suggested by Dominik
Honnef.
2010-08-11 07:27:50 +00:00
Tiago Cunha
4387db506f Sync OpenBSD patchset 742:
dup() the stdin fd so it isn't closed twice (once for stdin, once for tty).
2010-08-09 21:45:37 +00:00
Tiago Cunha
d7bae0edce Sync OpenBSD patchset 741:
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.
2010-08-09 21:44:25 +00:00
Nicholas Marriott
482bd7b65e Basic GNU bash completion from Frank Barknecht. 2010-08-09 18:22:33 +00:00
Theo Deraadt
4274a7ec89 switch back to kqueue for now, since (a) kqueue has been fixed to deal
with strange devices and (b) since there appears to be a bull in the
poll code in libevent as well...
requested by nicm who is away
2010-08-04 19:46:13 +00:00
Nicholas Marriott
f42364b4b5 How to blank on lock, from Thomas Adam, slightly tweaked by me. 2010-07-31 11:46:28 +00:00
Nicholas Marriott
5be8175b0b No more up-pane/down-pane. 2010-07-31 11:39:13 +00:00
Nicholas Marriott
77f9c49829 dup() the stdin fd so it isn't closed twice (once for stdin, once for tty). 2010-07-28 22:15:15 +00:00
Tiago Cunha
5576fe42b2 Sync with reality, per SF bug #3035214. 2010-07-27 18:29:07 +00:00
Nicholas Marriott
c87187f913 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.
2010-07-24 20:11:59 +00:00
Nicholas Marriott
bf09b00fe9 kqueue(2) is currently broken when used with /dev/null and a few other
devices.

An upcoming fix for some problems with the client stdout/stderr handling
relies on it working, so make tmux force libevent to use poll(2) via
EVENT_NOKQUEUE, until we have fixed kqueue.
2010-07-24 19:25:31 +00:00
Nicholas Marriott
a97b7ad11c Fix a crash: if remain-on-exit is set and the pane has exited, the
buffers may not be valid, so do not try to disable/enable them when
switching to copy mode.
2010-07-22 21:10:51 +00:00
Micah Cowan
1944747759 Don't enable/disable invalid event pointers. Fixes SF #3033119. 2010-07-22 19:51:48 +00:00
Tiago Cunha
28c4c86589 Sync OpenBSD patchset 738:
Don't return if in the current window since we may want to report a bell
(if bell-action any/current), just clear the flag so the status line
doesn't show the bell.
2010-07-20 17:36:41 +00:00
Tiago Cunha
7ed9b0f8fb Sync OpenBSD patchset 737:
Send the \n to stdout with the message, not stderr... doh.
2010-07-20 17:36:03 +00:00
Nicholas Marriott
2b80ede963 Don't return if in the current window since we may want to report a bell
(if bell-action any/current), just clear the flag so the status line
doesn't show the bell.
2010-07-19 21:13:03 +00:00
Nicholas Marriott
11497af4dd Solaris has MAXHOSTNAMELEN in netdb.h. 2010-07-19 18:31:42 +00:00
Nicholas Marriott
2a0f3f0d79 Send the \n to stdout with the message, not stderr... doh. 2010-07-19 18:27:38 +00:00