summaryrefslogtreecommitdiffstats
path: root/server.c
AgeCommit message (Collapse)Author
2013-11-14Merge branch 'obsd-master'Thomas Adam
2013-10-20Do not run any command line command from the client which starts thenicm
server until after the configuration file completes. This prevents it racing against run-shell or if-shell in .tmux.conf that run in the background.
2013-04-24Rename global configuration define.Nicholas Marriott
2013-04-24Use sysconfdir for the location of global tmux.conf (but default it to /etc),Nicholas Marriott
based on changes from Dagobert Michelsen.
2013-03-24Add a command queue to standardize and simplify commands that call otherNicholas Marriott
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.
2013-03-22No more lint means no more ARGSUSED.Nicholas Marriott
2013-02-23Add a command queue to standardize and simplify commands that call otherNicholas Marriott
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.
2013-02-17No more lint means no more ARGSUSED.Nicholas Marriott
2012-12-08Merge branch 'obsd-master'Thomas Adam
Sync from OpenBSD.
2012-12-06Fix argument order in a log statement.Nicholas Marriott
2012-11-22Merge branch 'obsd-master'Thomas Adam
Sync from OpenBSD. * obsd-master: Add halfpage commands to mode command string table (missed by accident), from Thomas Adam. Clarify some points about config files, notably that they are only read at server start. From Thomas Adam. Use a utility function for common code to show errors in config file, from Thomas Adam.
2012-11-19Use a utility function for common code to show errors in config file,Nicholas Marriott
from Thomas Adam.
2012-07-11Sync OpenBSD patchset 1150:Tiago Cunha
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-04-12Sync OpenBSD patchset 1092:Tiago Cunha
Stop accepting new clients for 1 second on EMFILE/ENFILE. Based on ongoing fixes to other daemons by Theo.
2012-04-11Stop accepting new clients for 1 second on EMFILE/ENFILE. Based onNicholas Marriott
ongoing fixes to other daemons by Theo.
2012-03-18Sync OpenBSD patchset 1043:Tiago Cunha
Use a lock file and flock() to serialize server start, avoids problems when running a bunch of tmux from cron at the same time. Based on a diff from Tim Ruehsen.
2012-03-09Use a lock file and flock() to serialize server start, avoids problemsNicholas Marriott
when running a bunch of tmux from cron at the same time. Based on a diff from Tim Ruehsen.
2011-07-09Expand the Id keyword. Tiago Cunha
2011-04-06PatchSet 870Nicholas Marriott
Date: 2011/03/27 21:27:26 Author: nicm Branch: HEAD Tag: (none) Log: Give each pane created in a tmux server a unique id (starting from 0), put it in the TMUX_PANE environment variable and accept it as a target. Suggested by and with testing and tweaks from Ben Boeckel.
2011-03-27Give each pane created in a tmux server a unique id (starting from 0),Nicholas Marriott
put it in the TMUX_PANE environment variable and accept it as a target. Suggested by and with testing and tweaks from Ben Boeckel.
2011-02-15Sync OpenBSD patchset 854:Tiago Cunha
Use LIST_* not SLIST_*.
2011-01-26Use LIST_* not SLIST_*.Nicholas Marriott
2011-01-21Sync OpenBSD patchset 834:Tiago Cunha
Move all calls to fcntl(...O_NONBLOCK) into a function and clear the flag on the stdio file descriptors before closing them (fixes things like "tmux ls && cat").
2011-01-08Move all calls to fcntl(...O_NONBLOCK) into a function and clear theNicholas Marriott
flag on the stdio file descriptors before closing them (fixes things like "tmux ls && cat").
2011-01-03Sync OpenBSD patchset 819:Tiago Cunha
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@.
2011-01-01Don't reset the activity timer for unattached sessions every second,Nicholas Marriott
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@.
2010-12-30Change from a per-session stack of buffers to one global stack which isNicholas Marriott
much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server option. By Tiago Cunha.
2010-12-30Global paste buffers instead of per-session which renders copy-buffer useless.Tiago Cunha
As a consequence buffer-limit is now a server option.
2010-12-22Sync OpenBSD patchset 806:Tiago Cunha
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.
2010-12-21Store sessions in an RB tree by name rather than a list, this is tidierNicholas Marriott
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.
2010-10-24Put setproctitle back under HAVE_SETPROCTITLE.Nicholas Marriott
2010-10-24Sync OpenBSD patchset 777:Tiago Cunha
Merge the before and after attach client code into one in client.c (instead of two in tmux.c and client.c).
2010-10-24Sync OpenBSD patchset 775:Tiago Cunha
Trying to set FD_CLOEXEC on every fd is a lost cause, just use closefrom() before exec.
2010-10-18Merge the before and after attach client code into one in client.cNicholas Marriott
(instead of two in tmux.c and client.c).
2010-10-16Trying to set FD_CLOEXEC on every fd is a lost cause, just useNicholas Marriott
closefrom() before exec.
2010-10-09Sync OpenBSD patchset 766:Tiago Cunha
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.
2010-10-09Sync OpenBSD patchset 765:Tiago Cunha
Modify the permissions on the socket when adding or removing +x to show attached sessions, rather than replacing them.
2010-09-26Two new options:Nicholas Marriott
- 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.
2010-09-26Modify the permissions on the socket when adding or removing +x to showNicholas Marriott
attached sessions, rather than replacing them.
2010-08-29Sync OpenBSD patchset 751:Tiago Cunha
Do not call event_del() for signals after fork(), just use sigaction() directly instead - calling libevent functions after fork() w/o event_reinit() is a bad idea, even if in this case it was harmless.
2010-08-19Do not call event_del() for signals after fork(), just use sigaction()Nicholas Marriott
directly instead - calling libevent functions after fork() w/o event_reinit() is a bad idea, even if in this case it was harmless.
2010-08-04switch back to kqueue for now, since (a) kqueue has been fixed to dealTheo Deraadt
with strange devices and (b) since there appears to be a bull in the poll code in libevent as well... requested by nicm who is away
2010-07-24kqueue(2) is currently broken when used with /dev/null and a few otherNicholas Marriott
devices. An upcoming fix for some problems with the client stdout/stderr handling relies on it working, so make tmux force libevent to use poll(2) via EVENT_NOKQUEUE, until we have fixed kqueue.
2010-06-22Sync OpenBSD patchset 722:Tiago Cunha
Give tmux sockets (but not the containing folder) group permissions. This allows hardlinks to the sockets to be used more easily.
2010-06-21Give tmux sockets (but not the containing folder) groupNicholas Marriott
permissions. This allows hardlinks to the sockets to be used more easily.
2010-05-16Fix bad merge, from Romain Francoise.Nicholas Marriott
2010-05-14Sync OpenBSD patchset 696:Tiago Cunha
Make signal handler setup/teardown two common functions instead of six, and reset SIGCHLD after fork to fix problems with some shells. From Romain Francoise.
2010-05-04Put this back in with the initialisation in the right order.Nicholas Marriott
2010-05-04Revert last change, it appears to be broken somehow.Nicholas Marriott