aboutsummaryrefslogtreecommitdiff
path: root/server-fn.c
Commit message (Collapse)AuthorAge
...
| * Regularise some fatal messages.Nicholas Marriott2009-09-20
| |
| * Tidy some common code for destroying sessions into a new function.Nicholas Marriott2009-09-12
| |
| * Only redraw all clients once when the backoff timer expires rather than everyNicholas Marriott2009-09-05
| | | | | | | | | | | | second all the time. Reported by Simon Nicolussi.
| * When incorrect passwords are entered, behave similarly to login(1) and backoffNicholas Marriott2009-09-02
| | | | | | | | for a bit. Based on a diff from martynas@.
| * Use "Password:" with no space for password prompts and don't display a *s forNicholas Marriott2009-09-01
| | | | | | | | | | the password, like pretty much everything else. From martynas@ with minor tweaks by me.
| * Add a new display-panes command, with two options (display-panes-colour andNicholas Marriott2009-08-31
| | | | | | | | | | display-panes-time), which displays a visual indication of the number of each pane.
| * Switch tmux to use imsg. This is the last major change to make theNicholas Marriott2009-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | client-server protocol more resilient and make the protocol versioning work properly. In future, the only things requiring a protocol version bump will be changes in the message structs, and (when both client and server have this change) mixing different versions should nicely report an error message. As a side effect this also makes the code tidier, fixes a problem with the way errors reported during server startup were handled, and supports fd passing (which will be used in future). Looked over by eric@, thanks. Please note that mixing a client with this change with an older server or vice versa may cause tmux to crash or hang - tmux should be completely exited before upgrading.
| * Infrastructure and commands to manage the environment for processes startedNicholas Marriott2009-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | within tmux. There is a global environment, copied from the external environment when the server is started and each sesssion has an (initially empty) session environment which overrides it. New commands set-environment and show-environment manipulate or display the environments. A new session option, update-environment, is a space-separated list of variables which are updated from the external environment into the session environment every time a new session is created - the default is DISPLAY.
| * If there is an error in the configuration file, don't just exit(1) as this canNicholas Marriott2009-08-07
| | | | | | | | | | | | | | | | | | | | | | cause the client to hang. Instead, send the error message, then mark the client as bad and start a normal shutdown so the server exits once the error is written. This also allows some code duplicating daemon(3) to be trimmed and logging to begin earlier. Prompted by Theo noticing the behaviour on error wasn't documented.
| * Rename struct hdrtype to msgtype which is a better name and can be used evenNicholas Marriott2009-07-29
| | | | | | | | when struct hdr disappears.
| * Make all messages sent between the client and server fixed size.Nicholas Marriott2009-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly with commands. The client now packs argv into a buffer and sends it to the server for parsing, rather than doing it itself and sending the parsed command data. As a side-effect this also removes a lot of now-unused command marshalling code. Mixing a server without this change and a client with or vice versa will cause tmux to hang or crash, please ensure that tmux is entirely killed before upgrading.
| * Display the number of failed password attempts (if any) when the server isNicholas Marriott2009-07-20
| | | | | | | | locked. From Tom Doherty.
| * Make it so using kill-pane to destroy the last pane in a window destroys theNicholas Marriott2009-07-17
| | | | | | | | window instead of being an error.
| * Oops, it is always a good idea to get arguments the right way round.Nicholas Marriott2009-07-17
| |
| * Memory could be leaked if a second prompt or message appeared while another wasNicholas Marriott2009-07-17
| | | | | | | | | | | | | | | | | | | | | | still present, so add a separate prompt free callback and make the _clear function responsible for calling it if necessary (rather than the individual prompt callbacks). Also make both messages and prompts clear any existing when a new is set. In addition, the screen could be modified while the prompt is there, restore the redraw-entire-screen behaviour on prompt clear; add a comment as a reminder.
| * Need time.h not sys/time.h for time(2).Nicholas Marriott2009-07-14
| |
| * Add a default-terminal option to set the starting value of $TERM in newNicholas Marriott2009-07-10
| | | | | | | | | | | | | | windows. This is "screen" by default and must be either that or something closely related. This does makes it easier to customise it if necessary.
| * When unlocking the server, don't try to clear the prompt on clients without aNicholas Marriott2009-06-30
| | | | | | | | | | | | | | prompt (such as the one issuing the unlock request). This caused the server to die if the wrong password was entered when unlocking from the command line with -U (nasty).
| * Miscellaneous unused functions, including one which was basically aNicholas Marriott2009-06-25
| | | | | | | | duplicate. Found by lint.
| * Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott2009-06-01
| | | | | | | terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti
* Use single stdout and stderr for control clients.Nicholas Marriott2013-03-11
|
* Rename session idx to session id throughout and add $ prefix to targets to useNicholas Marriott2013-03-07
| | | | it, extended from a diff from George Nachman.
* Add resize-pane -Z to temporary zoom the active pane to occupy the full windowNicholas Marriott2013-02-24
| | | | | | | | | | | | | or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z by default. The pane is unzoomed on pretty much any excuse whatsoever. We considered making this a new layout but the requirements are quite different from layouts so decided it is better as a special case. Each current layout cell is saved, a temporary one-cell layout generated and all except the active pane set to NULL. Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and Thiago Padilha for testing an earlier version.
* Add a command queue to standardize and simplify commands that call otherNicholas Marriott2013-02-23
| | | | | | | | | | | | | | | | | | | | commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
* Prevent lock on control clients, not on others.Nicholas Marriott2013-02-19
|
* No more lint means no more ARGSUSED.Nicholas Marriott2013-02-17
|
* Add various checks to turn off bits that can't work in control mode (such asNicholas Marriott2013-02-17
| | | | lock).
* If stdin in the client is enable immediately, tmux will eat anythingNicholas Marriott2012-09-04
| | | | | | | sent to stdin before it is needed, which can be inconvenient (eg pasting commands). Instead, start with stdin disabled and reuse MSG_STDIN from server->client to mean that stdin should be enabled. Based on a diff from Chris Johnsen.
* Sync OpenBSD patchset 1150:Tiago Cunha2012-07-11
| | | | | xfree is not particularly helpful, remove it. From Thomas Adam.
* Sync OpenBSD patchset 1138:Tiago Cunha2012-06-18
| | | | | | | | | Add a skeleton mode to tmux (called "control mode") that let's tmux commands be sent and output received on stdout. This can be used to integrate with other terminal emulators and should allow some other things to be made simpler later. More to come so doesn't do much yet and deliberately not documented.
* Sync OpenBSD patchset 1118:Tiago Cunha2012-05-22
| | | | | Add a helper function to send ready message.
* Sync OpenBSD patchset 1114:Tiago Cunha2012-05-22
| | | | | | | | | | | | | Instead of passing stdin/stdout/stderr file descriptors over imsg and handling them in the server, handle them in the client and pass buffers over imsg. This is much tidier for some upcoming changes and the performance hit isn't critical. The tty fd is still passed to the server as before. This bumps the tmux protocol version so new clients and old servers are incompatible.
* Sync OpenBSD patchset 1104:Tiago Cunha2012-05-03
| | | | | | | Add a flag to move-window to renumber the windows in a session (closing any gaps) and add an option to do this automatically each time a window is killed. From Thomas Adam.
* Sync OpenBSD patchset 1069:Tiago Cunha2012-03-18
| | | | | | Add notify hooks for various events, the functions are currently empty stubs but will be filled in for control mode later. From George Nachman.
* Sync OpenBSD patchset 1057:Tiago Cunha2012-03-18
| | | | | | Check event_initialized before event_del if event may not have been set up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
* Sync OpenBSD patchset 1014:Tiago Cunha2012-01-29
| | | | | | | Call bufferevent_free before closing file descriptor associated with it or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers in a twist. From Dylan Alex Simon.
* Sync OpenBSD patchset 969:Tiago Cunha2011-10-23
| | | | | | Support for \e[3J to clear the history. Also send the corresponding terminfo code (E3) before locking.
* Sync OpenBSD patchset 957:Tiago Cunha2011-09-21
| | | | | | Mark dead panes with some text saying they are dead, suggested by and with help from Randy Stauner.
* Expand the Id keyword. Tiago Cunha2011-07-09
|
* Sync OpenBSD patchset 848:Tiago Cunha2011-02-14
| | | | | Set $TMUX without the session when background jobs are run.
* Sync OpenBSD patchset 819:Tiago Cunha2011-01-03
| | | | | | | | | Don't reset the activity timer for unattached sessions every second, this screws up the choice of most-recently-used. Instead, break the time update into a little function and do it when the session is attached. Pointed out by joshe@.
* Sync OpenBSD patchset 808:Tiago Cunha2010-12-25
| | | | | | server_kill_window can modify the RB tree so don't use RB_FOREACH, fixes crash seen by Dan Harnett.
* Sync OpenBSD patchset 806:Tiago Cunha2010-12-22
| | | | | | | | | | | Store sessions in an RB tree by name rather than a list, this is tidier and allows them to easily be shown sorted in various lists (list-sessions/choose-sessions). Keep a session index which is used in a couple of places internally but make it an ever-increasing number rather than filling in gaps with new sessions.
* Sync OpenBSD patchset 802:Tiago Cunha2010-12-22
| | | | | Use pointer rather than index for the client's last session.
* Track the last session for a client and add a flag to switch-client andNicholas Marriott2010-12-11
| | | | | a key binding (L) to move a client back to its last session.
* Sync OpenBSD patchset 770:Tiago Cunha2010-10-09
| | | | | | Set cause when failing due to linking a window to itself, from Martin Pieuchot.
* Sync OpenBSD patchset 769:Tiago Cunha2010-10-09
| | | | | | Skip NULL entries in the sessions list when choosing the next session, from Simon Olofsson.
* Sync OpenBSD patchset 766:Tiago Cunha2010-10-09
| | | | | | | | | | | | | | | Two new options: - server option "exit-unattached" makes the server exit when no clients are attached, even if sessions are present; - session option "destroy-unattached" destroys a session once no clients are attached to it. These are useful for preventing tmux remaining in the background where it is undesirable and when using tmux as a login shell to keep a limit on new sessions.
* Sync OpenBSD patchset 746:Tiago Cunha2010-08-11
| | | | | | Treat trying to link or move to the same window as an error to avoid removing it accidentally.
* 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.