aboutsummaryrefslogtreecommitdiff
path: root/server-fn.c
Commit message (Collapse)AuthorAge
* Set $TMUX without the session when background jobs are run.Nicholas Marriott2011-01-23
|
* Don't reset the activity timer for unattached sessions every second,Nicholas Marriott2011-01-01
| | | | | | | 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@.
* server_kill_window can modify the RB tree so don't use RB_FOREACH, fixesNicholas Marriott2010-12-23
| | | | crash seen by Dan Harnett.
* Store sessions in an RB tree by name rather than a list, this is tidierNicholas Marriott2010-12-21
| | | | | | | | | 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.
* Use pointer rather than index for the client's last session.Nicholas Marriott2010-12-20
|
* 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.
* Set cause when failing due to linking a window to itself, from MartinNicholas Marriott2010-10-09
| | | | Pieuchot.
* Skip NULL entries in the sessions list when choosing the next session,Nicholas Marriott2010-10-05
| | | | from Simon Olofsson.
* Two new options:Nicholas Marriott2010-09-26
| | | | | | | | | | | | - 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.
* Treat trying to link or move to the same window as an error to avoidNicholas Marriott2010-08-11
| | | | removing it accidentally.
* When changing so that the client passes its stdout and stderr as well asNicholas Marriott2010-07-24
| | | | | | | | | | | | | | | | | | 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.
* New option, detach-on-destroy, to set what happens to a client when the sessionNicholas Marriott2010-06-27
| | | | | it is attached to is destroyed. If on (the default), it is detached; if off, it is switched to the most recently active session.
* Use server_destroy_session() for kill-session.Nicholas Marriott2010-06-26
|
* Having a list of winlinks->alerts for each session is stupid, just storeNicholas Marriott2010-06-21
| | | | the alert flags directly in the winlink itself.
* If remain-on-exit is set, both the error callback and a SIGCHLD couldNicholas Marriott2010-04-17
| | | | | | destroy the same pane (because the first one doesn't remove it from the list of panes), causing the pane bufferevent to be freed twice. So don't free it if the fd has already been set to -1, from Romain Francoise.
* Dead functions, lint.Nicholas Marriott2010-03-22
|
* When a window is destroyed, remove all links to it from each session ratherNicholas Marriott2010-01-23
| | | | than just the first. Reported by Robin Lee Powell.
* Options to set the colour of the pane borders, with different colours for theNicholas Marriott2010-01-03
| | | | active pane.
* Fix a couple of problems with grouped sessions reported by danh: redrawNicholas Marriott2009-12-22
| | | | properly and choose the correct last window after a window is killed.
* Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott2009-12-03
| | | | | time now I've configured emacs to make them displayed in really annoying colours...
* Remove a couple of unused arguments where possible, and add /* ARGSUSED */ toNicholas Marriott2009-11-26
| | | | the rest to reduce lint output.
* Destroy panes immediately rather than checking them all every loop.Nicholas Marriott2009-11-13
|
* Use timeout events for the identify and message timers.Nicholas Marriott2009-11-04
|
* Don't reenlist the client imsg event every loop, instead have a small functionNicholas Marriott2009-11-04
| | | | to it and call it after the event triggers or after a imsg is added.
* Set the current window pointer to NULL when killing a winlink that is to beNicholas Marriott2009-10-11
| | | | | | | replaced with link-window -k. This prevents it being pushed onto the last window stack and causing a use-after-free. Only took me an hour to find this :-/...
* Add "grouped sessions" which have independent name, options, current window andNicholas Marriott2009-10-10
| | | | | | | | so on but where the linked windows are synchronized (ie creating, killing windows and so on are mirrored between the sessions). A grouped session may be created by passing -t to new-session. Had this around for a while, tested by a couple of people.
* Check for already locked/suspended clients in server_lock_client rather thanNicholas Marriott2009-10-04
| | | | its callers.
* New lock-client and lock-session commands to lock an individual client or allNicholas Marriott2009-09-24
| | | | clients attached to a session respectively.
* Remove the internal tmux locking and instead detach each client and run theNicholas Marriott2009-09-23
| | | | | | | | | | | | | | command specified by a new option "lock-command" (by default "lock -np") in each client. This means each terminal has to be unlocked individually but simplifies the code and allows the system password to be used to unlock. Note that the set-password command is gone, so it will need to be removed from configuration files, and the -U command line flag has been removed. This is the third protocol version change so again it is best to stop the tmux server before upgrading.
* Move some common and untidy code for window link/unlink into generic functionsNicholas Marriott2009-09-20
| | | | instead of duplicating it in move/link window..
* 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