summaryrefslogtreecommitdiffstats
path: root/server-msg.c
AgeCommit message (Collapse)Author
2009-10-11Sync OpenBSD patchset 370:Tiago Cunha
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.
2009-09-25Sync OpenBSD patchset 352:Tiago Cunha
Don't allow locked or suspended clients to limit the size of active clients.
2009-09-23Adjust OpenBSD patchset 350 to the portable version.Tiago Cunha
2009-09-23Sync OpenBSD patchset 350:Tiago Cunha
Support -c like sh(1) to execute a command, useful when tmux is a login shell. Suggested by halex@. This includes another protocol version increase (the last for now) so again restart the tmux server before upgrading.
2009-09-23Sync OpenBSD patchset 347:Tiago Cunha
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.
2009-09-23Sync OpenBSD patchset 346:Tiago Cunha
Trim some code by moving the ioctl(TIOCGWINSZ) after SIGWINCH from the client into the server. This is another (the second of four) protocol version changes coming this morning, so again the server should be killed before upgrading.
2009-09-23Sync OpenBSD patchset 345:Tiago Cunha
Don't attempt to open() the tty path, rely on the client sending its stdin fd with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init instead of tty_open to prevent them leaking into child processes if any are created between the two calls. This bumps the protocol version, so the tmux server should be killed before upgrading.
2009-09-15Sync OpenBSD patchset 327:Tiago Cunha
The default terminal size should be 80x24, not 80x25.
2009-09-03Sync OpenBSD patchset 308:Tiago Cunha
When incorrect passwords are entered, behave similarly to login(1) and backoff for a bit. Based on a diff from martynas@.
2009-08-24Sync OpenBSD patchset 289:Tiago Cunha
The cursession member in struct cmd_ctx is always either curclient->session or NULL when curclient is also NULL, so just eliminate it.
2009-08-14Sync OpenBSD patchset 251:Tiago Cunha
If the client passes zero for the window size in the identify message (which it can, for example on serial terminals), reset it to 80x25, same as for resize messages. Problem reported by kettenis@.
2009-08-14Sync OpenBSD patchset 246:Tiago Cunha
Have the client pass its stdin fd to the server when identifying itself and have the server use that rather than reopening the tty. If the fd isn't given, use the old behaviour (so no need for a version change). This allows tmux to be used as the shell, so also change so that when working out the command to execute if default-command is empty (the default), tmux will try not execute itself.
2009-08-14Sync OpenBSD patchset 244:Tiago Cunha
Drop the no_stop argument to tty_close and tty_free in favour of a flag in the tty struct.
2009-08-14Sync OpenBSD patchset 243:Tiago Cunha
Switch tmux to use imsg. This is the last major change to make the 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.
2009-08-09Sync OpenBSD patchset 231:Tiago Cunha
Infrastructure and commands to manage the environment for processes started within tmux. There is a global environment, copied from the external environment when the server is started and each session 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.
2009-07-30Sync OpenBSD patchset 203:Tiago Cunha
Similar changes for server_msg_dispatch: use a switch instead of a lookup table and merge smaller functions inline.
2009-07-30Sync OpenBSD patchset 196:Tiago Cunha
Rename struct hdrtype to msgtype which is a better name and can be used even when struct hdr disappears.
2009-07-28Sync OpenBSD patchset 181:Tiago Cunha
Make all messages sent between the client and server fixed size. 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.
2009-07-23Sync OpenBSD patchset 173:Tiago Cunha
None of the server message functions return anything but 0, so make them all void. Also remove a leftover variable in client.c.
2009-07-08Fix $Id$.Nicholas Marriott
2009-07-08Handle empty or unset TERM correctly; also fix a fatal() message while here.Nicholas Marriott
2009-07-08When sending a "protocol mismatch" error message, tell the client to exitNicholas Marriott
afterwards, otherwise it hangs.
2009-06-25Restore $Id$ and add script to do so.Nicholas Marriott
2009-06-25Terminate cwd buffer before running xstrdup on it.Nicholas Marriott
2009-06-25If the prompt is hidden or a password is sent with -U, zero it before freeingNicholas Marriott
it.
2009-05-04Space trimmage mega-diff.Nicholas Marriott
2009-03-07Support for 88 colour terminals.Nicholas Marriott
2009-02-16strdup() not necessary here.Nicholas Marriott
2009-02-11Move sx,sy into tty rather than client.Nicholas Marriott
2009-01-28Exit properly when bas password.Nicholas Marriott
2009-01-20Die properly with warning.Nicholas Marriott
2009-01-19Pass return code from _exec; allow command sequences to work from the ↵Nicholas Marriott
command line.
2009-01-18Reset tty saved data on resize.Nicholas Marriott
2009-01-18suspend-client command and suspend client when ^Z key binding is used.Nicholas Marriott
2009-01-11Window splitting. Two vertical panes fixed 50% each. This is a huge diff, ↵Nicholas Marriott
still a couple of bugs (notably heap corruption somewhere causing segfault on exit).
2009-01-11Server locking. set-password and lock-server commands, plus automatic locking.Nicholas Marriott
2009-01-10Pick up cwd from environment,.Nicholas Marriott
2009-01-07Minor tidying; remove some old debugging messages.Nicholas Marriott
2009-01-07Introduce nitems() and use it; use bsearch.Nicholas Marriott
2008-09-26Trim.Nicholas Marriott
2008-09-25Internal screen data rewrite for better 256 colour/UTF-8 support.Nicholas Marriott
2008-09-09Initial UTF-8 support.Nicholas Marriott
2008-07-01Protocol versioning, version is checked on identify message.Nicholas Marriott
2008-06-21Lose unnecessary flags on context.Nicholas Marriott
2008-06-18Trimify.Nicholas Marriott
2008-06-16Informational messages on window option changes.Nicholas Marriott
2008-06-02Clear msgdata where it is unavailable.Nicholas Marriott
2008-06-02Move -s and -c down a level so handling them is the responsibility of the ↵Nicholas Marriott
command (with some helper functions), rather than the top-level. This changes the action command syntax so that -s and -c must be after the command rather than before.
2007-12-13Sync with Makefile.Nicholas Marriott
2007-12-12Don't free twice when exiting.Nicholas Marriott