aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
Commit message (Collapse)AuthorAge
...
* Sync OpenBSD patchset 750:Tiago Cunha2010-08-29
| | | | | | 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@.
* Sync OpenBSD patchset 745:Tiago Cunha2010-08-11
| | | | | | | | | | | | 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.
* Sync OpenBSD patchset 742:Tiago Cunha2010-08-09
| | | | | dup() the stdin fd so it isn't closed twice (once for stdin, once for tty).
* Sync OpenBSD patchset 741:Tiago Cunha2010-08-09
| | | | | | | | | | | | | | | | | | | | 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.
* Sync OpenBSD patchset 737:Tiago Cunha2010-07-20
| | | | | Send the \n to stdout with the message, not stderr... doh.
* Sync OpenBSD patchset 734:Tiago Cunha2010-07-17
| | | | | | | | | Return the command client return code with MSG_EXIT now that MSG_ERROR and MSG_PRINT are unused. New clients should be compatible with old tmux servers but vice versa may print an error.
* Sync OpenBSD patchset 731:Tiago Cunha2010-07-02
| | | | | | | | | | Send all three of stdin, stdout, stderr from the client to the server, so that commands can directly make use of them. This means that load-buffer and save-buffer can have "-" as the file to read from stdin or write to stdout. This is a protocol version bump so the tmux server will need to be restarted after upgrade (or an older client used).
* Sync OpenBSD patchset 716:Tiago Cunha2010-06-06
| | | | | | | | | | | | | | | | | | | | Fix problems with window sizing seen by Raghavendra D Prabhu when starting tmux from .xinitrc. One of the very few things the server relies on the client for now is to pass through a message on SIGWINCH, but there is a condition where potentially a SIGWINCH may be lost during the transition from unattached (main.c) to attached (client.c). So trigger a size change immediately after the client installs its SIGWINCH handler. Also, when the terminal is resized, reset the scroll region and cursor position. Previously, we were clearing our saved idea of these, but in fact some terminals do not reset them on resize, so this caused problems during redraw. While here make a resize to the same size not cause a redraw and rename the tmux.out output log file to include the tmux PID.
* Pass in the session, rather than the client, to window modes' key() function.Micah Cowan2010-05-22
| | | | | We were only ever using the client to find the session anyway.
* Sync OpenBSD patchset 639:Tiago Cunha2010-02-08
| | | | | | Support attaching a client read-only with a new -r flag to the attach-session command.
* Sync OpenBSD patchset 638:Tiago Cunha2010-02-08
| | | | | | Change nested check to compare server socket path rather than just assuming that if $TMUX is set it is nested. From Micah Cowan.
* Sync OpenBSD patchset 605:Tiago Cunha2010-01-08
| | | | | mouse-select-pane has to redraw the borders now too.
* Sync OpenBSD patchset 597:Tiago Cunha2010-01-05
| | | | | | Options to set the colour of the pane borders, with different colours for the active pane.
* Sync OpenBSD patchset 585:Tiago Cunha2009-12-10
| | | | | | | | | Add "server options" which are server-wide and not bound to a session or window. Set and displayed with "set -s" and "show -s". Currently the only option is "quiet" (like command-line -q, allowing it to be set from .tmux.conf), but others will come along.
* Sync OpenBSD patchset 581:Tiago Cunha2009-12-04
| | | | | | | Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
* Sync OpenBSD patchset 567:Tiago Cunha2009-11-28
| | | | | | Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to the rest to reduce lint output.
* Sync OpenBSD patchset 553:Tiago Cunha2009-11-19
| | | | | | | | | | Two new options, window-status-format and window-status-current-format, which allow the format of each window in the status line window list to be controlled using similar # sequences as status-left/right. This diff also moves part of the way towards UTF-8 support in window names but it isn't quite there yet.
* Sync OpenBSD patchset 549:Tiago Cunha2009-11-19
| | | | | | Don't interpret #() for display-message, it usually doesn't make sense and may leak commands.
* Sync OpenBSD patchset 546:Tiago Cunha2009-11-19
| | | | | | | | | | Add a per-client log of status line messages displayed while that client exists. A new message-limit session option sets the maximum number of entries and a command, show-messages, shows the log (bound to ~ by default). This (and prompt history) might be better as a single global log but until there are global options it is easier for them to be per client.
* Sync OpenBSD patchset 537:Tiago Cunha2009-11-14
| | | | | Tidy up and fix some types, prompted by lint via deraadt.
* Sync OpenBSD patchset 527:Tiago Cunha2009-11-13
| | | | | | Only need to chmod +x or -x the socket when a client is created, lost or attached, rather than every event loop.
* Sync OpenBSD patchset 508:Tiago Cunha2009-11-08
| | | | | | | | | | | | Switch tty key input over to happen on a read event. This is a bit more complicated because of escape input, but in that case instead of processing a key immediately, schedule a timer and reprocess the bufer when it expires. This currently assumes that keys will be atomic (ie that if eg F1 is pressed the entire sequence is present in the buffer). This is usually but not always true, a change in the tree format so it can differentiate potential (partial) key sequences will happens soon and will allow this to be fixed.
* Sync OpenBSD patchset 507:Tiago Cunha2009-11-08
| | | | | Convert the key repeat timer to an event.
* Sync OpenBSD patchset 505:Tiago Cunha2009-11-08
| | | | | | Move status timer check into the global once-per-second timer, this could maybe be done better but one every second is better than once every 50 ms.
* Sync OpenBSD patchset 504:Tiago Cunha2009-11-08
| | | | | Use timeout events for the identify and message timers.
* Sync OpenBSD patchset 503:Tiago Cunha2009-11-08
| | | | | | Don't reenlist the client imsg event every loop, instead have a small function to it and call it after the event triggers or after a imsg is added.
* Sync OpenBSD patchset 495:Tiago Cunha2009-11-08
| | | | | Switch tty fds over to a bufferevent.
* Sync OpenBSD patchset 491:Tiago Cunha2009-11-08
| | | | | | | | | | | | Initial changes to move tmux to libevent. This moves the client-side loops are pretty much fully over to event-based only (tmux.c and client.c) but server-side (server.c and friends) treats libevent as a sort of clever poll, waking up after every event to run various things. Moving the server stuff over to bufferevents and timers and so on will come later.
* Sync OpenBSD patchset 485:Tiago Cunha2009-11-04
| | | | | | | | | | Add an activity time for clients, like for sessions, and change session and client lookup to pick the most recently used rather than the most recently created - this is much more useful when used interactively and (because the activity time is set at creation) should have no effect on source-file. Based on a problem reported by Jan Johansson.
* Sync OpenBSD patchset 483:Tiago Cunha2009-11-04
| | | | | | | | | | Change session and client activity and creation time members to have more meaningful names. Also, remove the code to try and update the session activity time for the command client when a command message is received as is pointless because it des not have a session.
* Sync OpenBSD patchset 468:Tiago Cunha2009-10-28
| | | | | Move the poll registration functions into the server-*.c files.
* Sync OpenBSD patchset 467:Tiago Cunha2009-10-28
| | | | | tabs are better; ok nicm
* Sync OpenBSD patchset 462:Tiago Cunha2009-10-28
| | | | | | | Don't do anything in the client callback if the client has already died to avoid a use-after-free (the callback is used twice, once for the client itself and once for the tty). Fixes crashes seen by Han Boetes.
* Sync OpenBSD patchset 448:Tiago Cunha2009-10-28
| | | | | Don't try to continue processing a client if the session has been destroyed.
* Sync OpenBSD patchset 446:Tiago Cunha2009-10-28
| | | | | | | | | | | | | | | Remove the -d flag to tmux and just use op/AX to detect default colours. Irritatingly, although op can be used to tell if a terminal supports default colours, it can't be used to set them because in some terminfo descriptions it resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so it is not possible to determine reliably what the terminal state will be afterwards. So if AX is missing and op is present, tmux just sends sgr0. Anyone using -d for a terminal who finds they actually needed it can replace it using terminal-overrides, but please let me know as it is probably an omission from terminfo.
* Sync OpenBSD patchset 445:Tiago Cunha2009-10-28
| | | | | +time.h.
* Sync OpenBSD patchset 440:Tiago Cunha2009-10-23
| | | | | | Redraw checks have to after handling input or pane redraw flags set by key presses will not be acted on.
* Sync OpenBSD patchset 439:Tiago Cunha2009-10-23
| | | | | | The client buffers have to be checked after every event in order to catch the escape timers and properly reset the cursor.
* Adjust OpenBSD patchset 438 to the portable version.Tiago Cunha2009-10-23
|
* Sync OpenBSD patchset 438:Tiago Cunha2009-10-23
Split the server code handling clients, jobs and windows off into separate files from server.c (merging server-msg.c into the client file) and rather than iterating over each set after poll(), allow a callback to be specified when the fd is added and just walk once over the returned pollfds calling each callback where needed. More to come, getting this in so it is tested.