aboutsummaryrefslogtreecommitdiff
path: root/server.c
Commit message (Collapse)AuthorAge
...
* Sync OpenBSD patchset 497:Tiago Cunha2009-11-08
| | | | | | Call event_init() before loading the config file, since potentially it could set up events.
* Sync OpenBSD patchset 493:Tiago Cunha2009-11-08
| | | | | Switch jobs over to use 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 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 476:Tiago Cunha2009-11-02
| | | | | Reorder slightly to tidy code.
* 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 466:Tiago Cunha2009-10-28
| | | | | | Clear signal flags /before/ taking action and continue afterwards to reduce chance of dropping signals. Pointed out by deraadt@.
* 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.
* Sync OpenBSD patchset 403:Tiago Cunha2009-10-15
| | | | | | When a session is unattached, reset its activity timer to prevent it locking instantly when reattached.
* Sync OpenBSD patchset 393:Tiago Cunha2009-10-15
| | | | | Similarly add a tty_cursor_pane function to tidy up most of the calls.
* Sync OpenBSD patchset 392:Tiago Cunha2009-10-15
| | | | | _absolute is redundant, just use tty_region.
* Sync OpenBSD patchset 391:Tiago Cunha2009-10-15
| | | | | | Cleanup: use two functions for region setting, one for absolute and one inside pane.
* Sync OpenBSD patchset 387:Tiago Cunha2009-10-12
| | | | | | | | | | | | | Add a pipe-pane command to allow a pane to be piped to a shell command, for example: pipe-pane 'cat >~/out' No arguments stops outputing and closes the pipe; the -o flag toggles a pipe and on and off (useful for key bindings). Suggested by espie@.
* Sync OpenBSD patchset 384:Tiago Cunha2009-10-12
| | | | | Switch run-shell over to queue the command in the background like #().
* Sync OpenBSD patchset 382:Tiago Cunha2009-10-12
| | | | | | Collect status from dead jobs and don't invoke the callback until both all input (the socket is closed) and status is available.
* Sync OpenBSD patchset 381:Tiago Cunha2009-10-12
| | | | | | | | | Clean up by introducing a wrapper struct for mouse clicks rather than passing three u_chars around. As a side-effect this fixes incorrectly rejecting high cursor positions (because it was comparing them as signed char), reported by Tom Doherty.
* Sync OpenBSD patchset 380:Tiago Cunha2009-10-12
| | | | | | Braek some bits out of server_fill_client() that aren't really related to polling into their own function.
* Sync OpenBSD patchset 379:Tiago Cunha2009-10-12
| | | | | | Put all jobs on a global all_jobs list and use that in server.c instead of running through all the clients.
* Sync OpenBSD patchset 374:Tiago Cunha2009-10-11
| | | | | | | | | | | | | | | | | | | Rather than running status-left, status-right and window title #() with popen immediately every redraw, queue them up and run them in the background, starting each once every status-interval. The actual status line uses the output from the last run. This brings several advantages: - tmux itself may be called from inside #() without causing the server to hang; - likewise, sleep or similar doesn't cause the server to block; - commands aren't run excessively often when redrawing; - commands shared by status-left and status-right, or used multiple times, will only be run once. run-shell and if-shell still use system()/popen() but will be changed over to use this too later.
* Sync OpenBSD patchset 373:Tiago Cunha2009-10-11
| | | | | | | | New option, mouse-select-pane. If on, the mouse may be used to select the current pane. Suggested by sthen@ and also by someone else ages ago who I have forgotten.
* Sync OpenBSD patchset 371:Tiago Cunha2009-10-11
| | | | | | | | | | Add "grouped sessions" which have independent name, options, current window and 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.
* Sync OpenBSD patchset 370:Tiago Cunha2009-10-11
| | | | | | | | | | | | | | | Support for individual session idle time locking. May be enabled by turning off the lock-server option (it is on by default). When this is off, each session locks when it has been idle for the lock-after-time setting. When on, the entire server locks when ALL sessions have been idle for their individual lock-after-time settings. This replaces one global-only option (lock-after-time) with another (lock-server), but the default behaviour is usually preferable so there don't seem to be many alternatives. Diff/idea largely from Thomas Adam, tweaked by me.
* Sync OpenBSD patchset 369:Tiago Cunha2009-10-11
| | | | | | | | | Instead of passing a struct pollfd ** around through various functions, build them into a tree and then convert into a flat poll array before and after poll. This adds a little code but should reduce annoying problems with ordering when adding new things that also need to be polled.
* Sync OpenBSD patchset 360:Tiago Cunha2009-10-06
| | | | | | | | If no target client is specified to commands which accept one, try to guess the current client, in a similar manner to how sessions already work: if the current session can be established and has only one client, use that; otherwise use the most recently created client.
* Sync OpenBSD patchset 352:Tiago Cunha2009-09-25
| | | | | Don't allow locked or suspended clients to limit the size of active clients.
* Sync OpenBSD patchset 349:Tiago Cunha2009-09-23
| | | | | | | On SIGTERM, just abandon any suspended/locked clients and leave them to it, otherwise the server will hang around (refusing new connections) until they exit properly.
* Sync OpenBSD patchset 347:Tiago Cunha2009-09-23
| | | | | | | | | | | | | | | | Remove the internal tmux locking and instead detach each client and run the 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.
* Sync OpenBSD patchset 343:Tiago Cunha2009-09-22
| | | | | | | | | | Permit multiple prefix keys to be defined, separated by commas, for example: set -g prefix ^a,^b Any key in the list acts as the prefix. The send-prefix command always sends the first key in the list.
* Sync OpenBSD patchset 332:Tiago Cunha2009-09-20
| | | | | Regularise some fatal messages.
* Sync OpenBSD patchset 331:Tiago Cunha2009-09-19
| | | | | | | New option, set-titles-string, to allow the window title to be specified (as for status-left/right) if set-titles is on. Also only update the title when the status line is being redrawn.
* Sync OpenBSD patchset 327:Tiago Cunha2009-09-15
| | | | | The default terminal size should be 80x24, not 80x25.
* Sync OpenBSD patchset 326:Tiago Cunha2009-09-15
| | | | | Nuke unused server_client_index function, pointed out by martynas@.
* Zap unused variables.Tiago Cunha2009-09-13
|
* Sync OpenBSD patchset 324:Tiago Cunha2009-09-13
| | | | | Tidy some common code for destroying sessions into a new function.
* Sync OpenBSD patchset 322:Tiago Cunha2009-09-11
| | | | | | Permit options such as status-bg to be configured using the entire 256 colour palette by setting "colour0" to "colour255".
* Sync OpenBSD patchset 321:Tiago Cunha2009-09-08
| | | | | | While the display-panes indicator is on screen, make the number keys select the pane with that index.
* Sync OpenBSD patchset 320:Tiago Cunha2009-09-07
| | | | | | Reference count clients and sessions rather than relying on a saved index for cmd-choose-*.
* Sync OpenBSD patchset 319:Tiago Cunha2009-09-07
| | | | | | | Tiny cleanup. ok nicm@
* Sync OpenBSD patchset 316:Tiago Cunha2009-09-05
| | | | | | | | Only redraw all clients once when the backoff timer expires rather than every second all the time. Reported by Simon Nicolussi.
* Sync OpenBSD patchset 314:Tiago Cunha2009-09-04
| | | | | Tell the user when sleeping due to password backoff.
* When shutting down the server, expect clients to be polite and exit when askedNicholas Marriott2009-09-02
| | | | | with the right message.
* Sync OpenBSD patchset 302:Tiago Cunha2009-08-31
| | | | | | | Add a new display-panes command, with two options (display-panes-colour and display-panes-time), which displays a visual indication of the number of each pane.
* Sync OpenBSD patchset 300:Tiago Cunha2009-08-31
| | | | | | Don't call tty_free unless the client is a terminal, otherwise tty_init hasn't been called and it may end up doing close(0). From Kalle Olavi Niemitalo.
* Sync OpenBSD patchset 290:Tiago Cunha2009-08-24
| | | | | | | When using source-file, run the commands in the context of the source-file command rather than with no context. This makes things like attach work from a file.
* Sync OpenBSD patchset 274:Tiago Cunha2009-08-20
| | | | | Whoops, getting the comparison the right way round is usually recommended.
* Sync OpenBSD patchset 272:Tiago Cunha2009-08-20
| | | | | | | options_get_number() is relatively expensive and a check for dead panes happens a lot more often than actually finding one, so instead of getting the option for every check, get it for every dead window found.
* Didn't mean to commit this stuff.Nicholas Marriott2009-08-19
|
* This is a better fix for OS X stupidity.Nicholas Marriott2009-08-19
|
* Sync OpenBSD patchset 263:Tiago Cunha2009-08-16
| | | | | | Reset attributes as well as scroll region before poll(2) and add a big comment explaining why.