summaryrefslogtreecommitdiffstats
path: root/server.c
AgeCommit message (Collapse)Author
2020-03-12When the server socket is given by the user with -S, create it withnicm
umask 177 instead of 117 because it may not be in a safe directory like the default directory in /tmp. The user can chmod it more open after it is created if they want.
2019-06-20Expand command formats in %if and move the config file loading later (tonicm
when the first client has identified) so all the client formats are available, fixes problems reported by Thomas Sattler.
2019-06-07Do not load the config file if the server is exiting because it failednicm
to start, otherwise commands like lsk which start the server again can end up looping infinitely. Also make the first client exit correctly. Problem reported by Wael M Nasreddine.
2019-05-20Replace the various identical error callbacks with a single one in cmd-queue.c.nicm
2019-04-17Break new window and pane creation common code from various commands andnicm
window.c into a separate file spawn.c.
2018-08-23Move job struct into job.c.nicm
2018-08-18SESSION_UNATTACHED flag is no longer necessary now we have an attachednicm
count instead.
2018-08-02session_groups can be static also.nicm
2018-03-08Add a missing client-detached hook when the server shuts down, and donicm
not exit until jobs started from run-shell/if-shell have finished (add a job flags member and a flag to indicate other jobs). GitHub issue 1245.
2018-02-22Add exit-empty option to exit server if no sessions (defaults to on).nicm
2017-12-19Report better error from server when socket create fails, GitHub issuenicm
1201.
2017-10-12Show exit status and time in the remain-on-exit pane text, mostly fromnicm
Timo Boettcher in GitHub issue 1103.
2017-07-14Because ignore SIGCHLD early, letting signal_del restore it doesn't worknicm
correctly, so set it explicitly back to default (and the others for good measure).
2017-07-12Block signals between forking and clearing signal handlers (or callingnicm
event_reinit) - if the child gets a signal and fires the libevent signal handler during this period it could write a signal into the parent's signal pipe. GitHub issue 1001 from Aaron van Geffen.
2017-07-12Move signal code into proc.c.nicm
2017-07-09Some extra logging to show why tmux might exit.nicm
2017-07-03Do not close panes until process has exited and any outstanding datanicm
has been written to the pipe-pane event if there is one. GitHub issue 991.
2017-06-04Support SIGUSR2 to stop and start logging for an existing server. Alsonicm
we currently only have two log levels so just use -v and -vv rather than -v and -vvvv, and clarify the man page entry for -v.
2017-04-22Memory leaks, from David CARLIER.nicm
2017-04-21Make the cmd_find_* functions more obvious when looking for a client,nicm
rather than having it inside other functions. Should be no change to the way targets are resolved just yet.
2017-04-21History needs to be loaded after config parsing is done - now thatnicm
commands are queued, that's in cfg_done not after start_cfg finishes.
2017-04-20If a #() command doesn't exit, use its most recent line of output (itnicm
must be a full line). Don't let it redraw the status line more than once a second. Requested by someone about 10 years ago...
2017-02-09Instead of numbering session groups, give them a name which may be givennicm
to -t instead of a target session. Also allow them to contain only one session.
2016-11-12Do not execute commands for a client until it has identified, fixesnicm
problem reported by Frank Terbeck.
2016-10-16Notifys can go via the command queue instead of using their own queue.nicm
2016-10-16Rewrite command queue handling. Each client still has a command queue,nicm
but there is also now a global command queue. Instead of command queues being dispatched on demand from wherever the command happens to be added, they are now all dispatched from the top level server loop. Command queues may now also include callbacks as well as commands, and items may be inserted after the current command as well as at the end. This all makes command queues significantly more predictable and easier to use, and avoids the complex multiple nested command queues used by source-file, if-shell and friends. A mass rename of struct cmdq to a better name (cmdq_item probably) is coming.
2016-10-15Drain notifys once at the end of the server loop instead of doing itnicm
from the end of every command queue (which could be nested).
2016-10-10Loads more static, except for cmd-*.c and window-*.c.nicm
2016-07-07tmux: only consider ACCESSPERMS for setting mode on socket_path.semarie
it explicitly removes any S_ISUID|S_ISGID|S_ISTXT bits, instead of letting pledge(2) silenciously remove them. ok nicm@ beck@ deraadt@
2016-03-30Bump the listen() backlog up, some people have scripts that run up a lotnicm
of clients quickly.
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-16Add infrastructure to work out the best target given a pane or windownicm
alone and use it to add pane_died and pane_exited hooks.
2015-12-15Make the marked pane a cmd_find_state.nicm
2015-11-24Do lock failures slightly better, return a special value so we don'tnicm
unlink the wrong thing.
2015-11-24Remove the -I part of show-messages which isn't really that useful; thenicm
server start time can now be accessed with a new start_time format (use: tmux display -p '#{t:start_time}')
2015-11-24Make the log stuff a bit tidier with some helper functions.nicm
2015-11-22Add getpw to pledge, makes tmux work in YP environments, discovered bynicm
matthieu, ok deraadt
2015-11-18Use __unused rather than rolling our own.nicm
2015-11-15Accidentally turned off pledge, turn it back on.nicm
2015-11-14Push stdout and stderr to clients more aggressively, and add an event tonicm
continue if the send fails.
2015-11-12Tidy utf8.c a little: build table on first use, and make utf8_width takenicm
a u_int rather than splitting and then combining again in utf8_split.
2015-10-31The output log is only useful once and it means creating a file, so opennicm
it once at startup instead of in every call to tty_open.
2015-10-27Move struct options into options.c.nicm
2015-10-27Break the common process set up, event loop and imsg dispatch codenicm
between server and client out into a separate internal API. This will make it easier to add another process.
2015-10-23tmux can call pledge() in main with large set and then reduce itnicm
slightly in the server to "stdio rpath wpath cpath fattr unix recvfd proc exec tty ps".
2015-10-22This should not be changed.nicm
2015-10-22Rename shutdown to exit.nicm
2015-10-11Userspace doesn't need to use SUN_LEN(): connect() and bind() must acceptguenther
sizeof(struct sockaddr_un), so do the simple, portable thing ok beck@ deraadt@
2015-09-01Move initial conf load into cfg.c.nicm
2015-08-30Event base does not need to be global.nicm