OpenBSD CVS

CVS log for src/usr.bin/tmux/server.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.206 / (download) - annotate - [select for diffs], Tue May 14 10:11:09 2024 UTC (4 days, 19 hours ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.205: +2 -2 lines
Diff to previous 1.205 (colored)

Add missing time.h to tty.c (from Ismail Donmez), also remove some stray
spaces.

Revision 1.205 / (download) - annotate - [select for diffs], Fri Sep 15 15:49:05 2023 UTC (8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.204: +1 -2 lines
Diff to previous 1.204 (colored)

Change UTF-8 combining to inspect the previous character at the cursor
position rather than keeping the last character from the input stream,
this is how most terminals work and fixes problems with displaying these
characters in vim. GitHub issue 3600.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Sep 1 14:29:11 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.203: +2 -1 lines
Diff to previous 1.203 (colored)

Rewrite combined character handling to be more consistent and to support
newer Unicode combined characters (which we have to "know" are combined
since they are not width zero). GitHub issue 3600.

Revision 1.203 / (download) - annotate - [select for diffs], Thu Jun 30 09:55:53 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.202: +1 -2 lines
Diff to previous 1.202 (colored)

Add support for OSC 8 hyperlinks (a VTE extension now supported by other
terminals such as iTerm2). Originally written by me then extended and
completed by first Will Noble and later Jeff Chiang. GitHub issues 911,
2621, 2890, 3240.

Revision 1.202 / (download) - annotate - [select for diffs], Tue Jun 21 09:30:01 2022 UTC (22 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.201: +5 -1 lines
Diff to previous 1.201 (colored)

Store time lines are scrolled into history and display in copy mode.

Revision 1.201 / (download) - annotate - [select for diffs], Mon May 30 12:48:57 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.200: +13 -5 lines
Diff to previous 1.200 (colored)

Add an ACL list for users connecting to the tmux socket. Users may be
forbidden from attaching, forced to attach read-only, or allowed to
attach read-write. A new command, server-access, configures the list.
tmux gets the user using getpeereid(3) of the client socket. Users must
still configure file system permissions manually. From Dallas Lyons and
others.

Revision 1.200 / (download) - annotate - [select for diffs], Mon Mar 28 07:40:57 2022 UTC (2 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.199: +5 -3 lines
Diff to previous 1.199 (colored)

Report error if creating socket fails with -D.

Revision 1.199 / (download) - annotate - [select for diffs], Fri Mar 25 06:14:42 2022 UTC (2 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.198: +4 -4 lines
Diff to previous 1.198 (colored)

Fix exit message if creating socket fails.

Revision 1.198 / (download) - annotate - [select for diffs], Thu Jun 10 07:45:43 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.197: +3 -2 lines
Diff to previous 1.197 (colored)

Fix warnings, from Jan Tache in GitHub issue 2692.

Revision 1.197 / (download) - annotate - [select for diffs], Thu Mar 11 07:08:18 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.196: +23 -5 lines
Diff to previous 1.196 (colored)

Tidy old jobs every hour instead of every 30 seconds.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Feb 11 09:39:29 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.195: +9 -22 lines
Diff to previous 1.195 (colored)

Add a couple of helper functions, and flush imsgs on exit.

Revision 1.195 / (download) - annotate - [select for diffs], Wed Sep 16 18:37:55 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.194: +6 -4 lines
Diff to previous 1.194 (colored)

Fix some warnings, GitHub issue 2382.

Revision 1.194 / (download) - annotate - [select for diffs], Thu Jun 18 08:34:22 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.193: +2 -2 lines
Diff to previous 1.193 (colored)

Add a flag to make a client wait for an empty line before exiting in
control mode to avoid stray commands ending up in the shell.

Revision 1.193 / (download) - annotate - [select for diffs], Mon Jun 1 09:43:01 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.192: +3 -4 lines
Diff to previous 1.192 (colored)

Instead of sending all data to control mode clients as fast as possible,
add a limit of how much data will be sent to the client and try to use
it for panes with some degree of fairness. GitHub issue 2217, with
George Nachman.

Revision 1.192 / (download) - annotate - [select for diffs], Sat May 16 16:30:59 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.191: +2 -1 lines
Diff to previous 1.191 (colored)

xterm-keys has been on by default for five years and all other modern
terminals use these key sequences by default. Merge the code into the
main tty and input tree processing (converting the latter to use a tree
rather than a table at the same time) and make the option a no-op.

Revision 1.191 / (download) - annotate - [select for diffs], Sat May 16 16:07:55 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.190: +29 -19 lines
Diff to previous 1.190 (colored)

Add a -D flag to ask tmux not to daemonize, useful both for running a
debugger (lldb does not have follow-fork-mode) and for running with a
managed supervisor init system. GitHub issue 2190.

Revision 1.190 / (download) - annotate - [select for diffs], Sat May 16 15:47:22 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.189: +36 -1 lines
Diff to previous 1.189 (colored)

Change message log to be per server rather than per client and include
every command that is run.

Revision 1.189 / (download) - annotate - [select for diffs], Sat May 16 15:24:28 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.188: +2 -1 lines
Diff to previous 1.188 (colored)

Add 'e' key in buffer mode to open the buffer in an editor.

Revision 1.188 / (download) - annotate - [select for diffs], Thu Mar 12 09:26:34 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.187: +12 -7 lines
Diff to previous 1.187 (colored)

When the server socket is given by the user with -S, create it with
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.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Jun 20 06:51:36 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.186: +2 -3 lines
Diff to previous 1.186 (colored)

Expand command formats in %if and move the config file loading later (to
when the first client has identified) so all the client formats are
available, fixes problems reported by Thomas Sattler.

Revision 1.186 / (download) - annotate - [select for diffs], Fri Jun 7 20:09:17 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.185: +7 -5 lines
Diff to previous 1.185 (colored)

Do not load the config file if the server is exiting because it failed
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.

Revision 1.185 / (download) - annotate - [select for diffs], Mon May 20 11:46:06 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.184: +3 -14 lines
Diff to previous 1.184 (colored)

Replace the various identical error callbacks with a single one in cmd-queue.c.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Apr 17 14:37:48 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.183: +2 -2 lines
Diff to previous 1.183 (colored)

Break new window and pane creation common code from various commands and
window.c into a separate file spawn.c.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Aug 23 15:45:05 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.182: +6 -21 lines
Diff to previous 1.182 (colored)

Move job struct into job.c.

Revision 1.182 / (download) - annotate - [select for diffs], Sat Aug 18 20:08:52 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.181: +2 -2 lines
Diff to previous 1.181 (colored)

SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.

Revision 1.181 / (download) - annotate - [select for diffs], Thu Aug 2 11:56:12 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.180: +1 -2 lines
Diff to previous 1.180 (colored)

session_groups can be static also.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Mar 8 08:09:10 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.179: +11 -2 lines
Diff to previous 1.179 (colored)

Add a missing client-detached hook when the server shuts down, and do
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.

Revision 1.179 / (download) - annotate - [select for diffs], Thu Feb 22 10:54:51 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.178: +4 -1 lines
Diff to previous 1.178 (colored)

Add exit-empty option to exit server if no sessions (defaults to on).

Revision 1.178 / (download) - annotate - [select for diffs], Tue Dec 19 15:00:39 2017 UTC (6 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.177: +43 -15 lines
Diff to previous 1.177 (colored)

Report better error from server when socket create fails, GitHub issue
1201.

Revision 1.177 / (download) - annotate - [select for diffs], Thu Oct 12 11:32:27 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.176: +2 -1 lines
Diff to previous 1.176 (colored)

Show exit status and time in the remain-on-exit pane text, mostly from
Timo Boettcher in GitHub issue 1103.

Revision 1.176 / (download) - annotate - [select for diffs], Fri Jul 14 18:49:07 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.175: +2 -2 lines
Diff to previous 1.175 (colored)

Because ignore SIGCHLD early, letting signal_del restore it doesn't work
correctly, so set it explicitly back to default (and the others for good
measure).

Revision 1.175 / (download) - annotate - [select for diffs], Wed Jul 12 10:04:51 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.174: +6 -2 lines
Diff to previous 1.174 (colored)

Block signals between forking and clearing signal handlers (or calling
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.

Revision 1.174 / (download) - annotate - [select for diffs], Wed Jul 12 09:24:17 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.173: +17 -4 lines
Diff to previous 1.173 (colored)

Move signal code into proc.c.

Revision 1.173 / (download) - annotate - [select for diffs], Sun Jul 9 22:33:09 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.172: +3 -2 lines
Diff to previous 1.172 (colored)

Some extra logging to show why tmux might exit.

Revision 1.172 / (download) - annotate - [select for diffs], Mon Jul 3 08:16:03 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.171: +7 -2 lines
Diff to previous 1.171 (colored)

Do not close panes until process has exited and any outstanding data
has been written to the pipe-pane event if there is one. GitHub issue 991.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Jun 4 08:25:57 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.170: +5 -2 lines
Diff to previous 1.170 (colored)

Support SIGUSR2 to stop and start logging for an existing server. Also
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.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Apr 22 06:13:30 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.169: +7 -3 lines
Diff to previous 1.169 (colored)

Memory leaks, from David CARLIER.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Apr 21 20:26:34 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored)

Make the cmd_find_* functions more obvious when looking for a client,
rather than having it inside other functions. Should be no change to the
way targets are resolved just yet.

Revision 1.168 / (download) - annotate - [select for diffs], Fri Apr 21 14:04:54 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.167: +1 -3 lines
Diff to previous 1.167 (colored)

History needs to be loaded after config parsing is done - now that
commands are queued, that's in cfg_done not after start_cfg finishes.

Revision 1.167 / (download) - annotate - [select for diffs], Thu Apr 20 09:20:22 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.166: +10 -3 lines
Diff to previous 1.166 (colored)

If a #() command doesn't exit, use its most recent line of output (it
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...

Revision 1.166 / (download) - annotate - [select for diffs], Thu Feb 9 15:04:53 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.165: +2 -2 lines
Diff to previous 1.165 (colored)

Instead of numbering session groups, give them a name which may be given
to -t instead of a target session. Also allow them to contain only one
session.

Revision 1.165 / (download) - annotate - [select for diffs], Tue Jan 24 21:50:22 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.164: +1 -2 lines
Diff to previous 1.164 (colored)

Fixed keys for choose mode, and remove the last mode keys bits.

Revision 1.164 / (download) - annotate - [select for diffs], Sat Nov 12 19:04:41 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.163: +5 -3 lines
Diff to previous 1.163 (colored)

Do not execute commands for a client until it has identified, fixes
problem reported by Frank Terbeck.

Revision 1.163 / (download) - annotate - [select for diffs], Sun Oct 16 19:15:02 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.162: +1 -3 lines
Diff to previous 1.162 (colored)

Notifys can go via the command queue instead of using their own queue.

Revision 1.162 / (download) - annotate - [select for diffs], Sun Oct 16 17:55:14 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.161: +10 -2 lines
Diff to previous 1.161 (colored)

Rewrite command queue handling. Each client still has a command queue,
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.

Revision 1.161 / (download) - annotate - [select for diffs], Sat Oct 15 00:01:01 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.160: +2 -1 lines
Diff to previous 1.160 (colored)

Drain notifys once at the end of the server loop instead of doing it
from the end of every command queue (which could be nested).

Revision 1.160 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.159: +20 -21 lines
Diff to previous 1.159 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.159 / (download) - annotate - [select for diffs], Thu Jul 7 09:24:09 2016 UTC (7 years, 10 months ago) by semarie
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.158: +2 -2 lines
Diff to previous 1.158 (colored)

tmux: only consider ACCESSPERMS for setting mode on socket_path.

it explicitly removes any S_ISUID|S_ISGID|S_ISTXT bits, instead of letting
pledge(2) silenciously remove them.

ok nicm@ beck@ deraadt@

Revision 1.158 / (download) - annotate - [select for diffs], Wed Mar 30 13:20:07 2016 UTC (8 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.157: +2 -2 lines
Diff to previous 1.157 (colored)

Bump the listen() backlog up, some people have scripts that run up a lot
of clients quickly.

Revision 1.157 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.156: +2 -2 lines
Diff to previous 1.156 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.156 / (download) - annotate - [select for diffs], Wed Dec 16 21:50:37 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.155: +2 -2 lines
Diff to previous 1.155 (colored)

Add infrastructure to work out the best target given a pane or window
alone and use it to add pane_died and pane_exited hooks.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Dec 15 00:00:01 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.154: +17 -43 lines
Diff to previous 1.154 (colored)

Make the marked pane a cmd_find_state.

Revision 1.154 / (download) - annotate - [select for diffs], Tue Nov 24 23:01:51 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.153: +6 -4 lines
Diff to previous 1.153 (colored)

Do lock failures slightly better, return a special value so we don't
unlink the wrong thing.

Revision 1.153 / (download) - annotate - [select for diffs], Tue Nov 24 21:52:06 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

Remove the -I part of show-messages which isn't really that useful; the
server start time can now be accessed with a new start_time format (use:
tmux display -p '#{t:start_time}')

Revision 1.152 / (download) - annotate - [select for diffs], Tue Nov 24 21:19:46 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.151: +2 -2 lines
Diff to previous 1.151 (colored)

Make the log stuff a bit tidier with some helper functions.

Revision 1.151 / (download) - annotate - [select for diffs], Sun Nov 22 19:41:19 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored)

Add getpw to pledge, makes tmux work in YP environments, discovered by
matthieu, ok deraadt

Revision 1.150 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.149: +2 -2 lines
Diff to previous 1.149 (colored)

Use __unused rather than rolling our own.

Revision 1.149 / (download) - annotate - [select for diffs], Sun Nov 15 14:32:48 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.148: +2 -2 lines
Diff to previous 1.148 (colored)

Accidentally turned off pledge, turn it back on.

Revision 1.148 / (download) - annotate - [select for diffs], Sat Nov 14 09:41:07 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.147: +2 -2 lines
Diff to previous 1.147 (colored)

Push stdout and stderr to clients more aggressively, and add an event to
continue if the send fails.

Revision 1.147 / (download) - annotate - [select for diffs], Thu Nov 12 12:19:57 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.146: +1 -2 lines
Diff to previous 1.146 (colored)

Tidy utf8.c a little: build table on first use, and make utf8_width take
a u_int rather than splitting and then combining again in utf8_split.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Oct 31 13:12:03 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.145: +3 -1 lines
Diff to previous 1.145 (colored)

The output log is only useful once and it means creating a file, so open
it once at startup instead of in every call to tty_open.

Revision 1.145 / (download) - annotate - [select for diffs], Tue Oct 27 15:58:42 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.144: +2 -2 lines
Diff to previous 1.144 (colored)

Move struct options into options.c.

Revision 1.144 / (download) - annotate - [select for diffs], Tue Oct 27 13:23:24 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.143: +20 -54 lines
Diff to previous 1.143 (colored)

Break the common process set up, event loop and imsg dispatch code
between server and client out into a separate internal API. This will
make it easier to add another process.

Revision 1.143 / (download) - annotate - [select for diffs], Fri Oct 23 16:07:29 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.142: +5 -1 lines
Diff to previous 1.142 (colored)

tmux can call pledge() in main with large set and then reduce it
slightly in the server to "stdio rpath wpath cpath fattr unix recvfd
proc exec tty ps".

Revision 1.142 / (download) - annotate - [select for diffs], Thu Oct 22 10:48:30 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

This should not be changed.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Oct 22 10:46:24 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.140: +12 -12 lines
Diff to previous 1.140 (colored)

Rename shutdown to exit.

Revision 1.140 / (download) - annotate - [select for diffs], Sun Oct 11 00:26:23 2015 UTC (8 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.139: +2 -2 lines
Diff to previous 1.139 (colored)

Userspace doesn't need to use SUN_LEN(): connect() and bind() must accept
sizeof(struct sockaddr_un), so do the simple, portable thing

ok beck@ deraadt@

Revision 1.139 / (download) - annotate - [select for diffs], Tue Sep 1 10:01:56 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.138: +4 -21 lines
Diff to previous 1.138 (colored)

Move initial conf load into cfg.c.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Aug 30 22:19:07 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

Event base does not need to be global.

Revision 1.137 / (download) - annotate - [select for diffs], Sat Aug 29 08:54:41 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.136: +3 -5 lines
Diff to previous 1.136 (colored)

We already loop over the windows in server_client_loop, so don't do it
again in server_loop just to check names.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Aug 29 08:30:54 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.135: +5 -2 lines
Diff to previous 1.135 (colored)

Move alerts onto events rather than checking every loop.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Aug 28 13:21:25 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.134: +1 -3 lines
Diff to previous 1.134 (colored)

Remove unused prototypes.

Revision 1.134 / (download) - annotate - [select for diffs], Fri Aug 28 13:12:20 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.133: +3 -44 lines
Diff to previous 1.133 (colored)

Per-session timers for locking, and remove the global one-second timer.

Revision 1.133 / (download) - annotate - [select for diffs], Fri Aug 28 12:31:55 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.132: +2 -27 lines
Diff to previous 1.132 (colored)

Remove the lock-server option which is a bit redundant, it isn't that
different without it.

Revision 1.132 / (download) - annotate - [select for diffs], Fri Aug 28 12:25:42 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.131: +1 -10 lines
Diff to previous 1.131 (colored)

Give clock mode its own timer.

Revision 1.131 / (download) - annotate - [select for diffs], Fri Aug 28 12:16:28 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.130: +1 -3 lines
Diff to previous 1.130 (colored)

Run status update on a per-client timer at status-interval.

Revision 1.130 / (download) - annotate - [select for diffs], Fri Aug 28 11:38:27 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.129: +1 -3 lines
Diff to previous 1.129 (colored)

Move format job cleanup onto its own timer.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jul 20 15:50:04 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.128: +3 -1 lines
Diff to previous 1.128 (colored)

Add an option (history-file) for a file to save/restore command prompt
history, from Olof-Joachim Frahm.

Revision 1.128 / (download) - annotate - [select for diffs], Fri Jun 5 18:18:32 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.127: +1 -20 lines
Diff to previous 1.127 (colored)

Similarly, for sessions use a callback to free rather than checking
every loop.

Revision 1.127 / (download) - annotate - [select for diffs], Fri Jun 5 18:01:12 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.126: +1 -12 lines
Diff to previous 1.126 (colored)

Instead of putting dead clients on a list and checking it every loop,
use event_once to queue a callback to deal with them. Also dead clients
with references would never actually be freed because the wrap-up
functions (the callback for stdin, or status_prompt_clear) would never
be called. So call them in server_client_lost.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Jun 4 11:43:51 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.125: +80 -14 lines
Diff to previous 1.125 (colored)

Add support for a single "marked pane". There is one marked pane in the
server at a time; it may be toggled or cleared with select-pane -m and
-M (the border is highlighted). A new target '~' or '{marked}' specifies
the marked pane to commands and it is the default target for the
swap-pane and join-pane -s flag (this makes them much simpler to use -
mark the source pane and then change to the target pane to run swapp or
joinp).

Revision 1.125 / (download) - annotate - [select for diffs], Mon Jun 1 09:20:19 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored)

Clear signal handlers before event_reinit as apparently it can otherwise
cause libevent to go strange.

Revision 1.124 / (download) - annotate - [select for diffs], Sun May 31 23:27:06 2015 UTC (8 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.123: +1 -2 lines
Diff to previous 1.123 (colored)

does not need syslog.h

Revision 1.123 / (download) - annotate - [select for diffs], Wed May 27 13:28:04 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.122: +3 -1 lines
Diff to previous 1.122 (colored)

Move the jobs output cache into the formats code so that #() work more
generally (for example, again working in set-titles-string).

Revision 1.122 / (download) - annotate - [select for diffs], Fri Apr 24 23:17:11 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.121: +28 -45 lines
Diff to previous 1.121 (colored)

Convert clients list into a TAILQ.

Revision 1.121 / (download) - annotate - [select for diffs], Wed Apr 22 15:30:11 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.120: +6 -17 lines
Diff to previous 1.120 (colored)

Change the windows array into an RB tree and fix some places where we
were only looking at the first winlink for a window in a session.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Apr 22 15:05:03 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.119: +2 -1 lines
Diff to previous 1.119 (colored)

window_index is only used in one place (window_destroy) so inline it there.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Apr 21 22:32:40 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.118: +15 -9 lines
Diff to previous 1.118 (colored)

Do not die on USR1 if any of the socket parent directories are
missing. Reported by Robin Powell.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Dec 9 19:23:35 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.117: +2 -1 lines
Diff to previous 1.117 (colored)

Add pane_dead_status for exit status of dead panes.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Oct 27 22:23:47 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.116: +7 -14 lines
Diff to previous 1.116 (colored)

Move cfg_causes local into cfg.c and remove struct causelist.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Sep 1 21:58:41 2014 UTC (9 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.115: +18 -2 lines
Diff to previous 1.115 (colored)

Wake up any clients waiting with the wait-for command when the server
exits.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Jul 21 10:52:48 2014 UTC (9 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.114: +2 -1 lines
Diff to previous 1.114 (colored)

lockf is entirely useless and it was a mistake to change to it, go back
to using flock which actually works sensibly. Also always retry the lock
to fix a potential race, and add some extra logging.

Revision 1.114 / (download) - annotate - [select for diffs], Wed May 14 06:21:19 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.113: +1 -2 lines
Diff to previous 1.113 (colored)

Now that cmdlists are reference counted, there is no need for two-step
deletion via the dead_key_bindings tree. From Keith Amling.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Apr 24 09:14:43 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.112: +1 -4 lines
Diff to previous 1.112 (colored)

There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Apr 17 14:45:49 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.111: +2 -2 lines
Diff to previous 1.111 (colored)

Some more long lines.

Revision 1.111 / (download) - annotate - [select for diffs], Sun Oct 20 17:28:43 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.110: +4 -1 lines
Diff to previous 1.110 (colored)

Do not run any command line command from the client which starts the
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.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Apr 24 10:01:32 2013 UTC (11 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.109: +5 -5 lines
Diff to previous 1.109 (colored)

Rename global configuration define.

Revision 1.109 / (download) - annotate - [select for diffs], Sun Mar 24 09:54:10 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.108: +25 -19 lines
Diff to previous 1.108 (colored)

Add a command queue to standardize and simplify commands that call other
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.

Revision 1.108 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.107: +1 -4 lines
Diff to previous 1.107 (colored)

No more lint means no more ARGSUSED.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Dec 6 12:49:13 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.106: +2 -2 lines
Diff to previous 1.106 (colored)

Fix argument order in a log statement.

Revision 1.106 / (download) - annotate - [select for diffs], Mon Nov 19 10:38:06 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.105: +6 -17 lines
Diff to previous 1.105 (colored)

Use a utility function for common code to show errors in config file,
from Thomas Adam.

Revision 1.105 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.104: +6 -6 lines
Diff to previous 1.104 (colored)

xfree is not particularly helpful, remove it. From Thomas Adam.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Apr 11 06:16:14 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.103: +32 -7 lines
Diff to previous 1.103 (colored)

Stop accepting new clients for 1 second on EMFILE/ENFILE. Based on
ongoing fixes to other daemons by Theo.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Mar 9 09:57:40 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.102: +6 -2 lines
Diff to previous 1.102 (colored)

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.

Revision 1.102 / (download) - annotate - [select for diffs], Sun Mar 27 20:27:26 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.101: +2 -1 lines
Diff to previous 1.101 (colored)

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.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Jan 26 00:11:47 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

Use LIST_* not SLIST_*.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Jan 8 01:52:36 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.99: +3 -7 lines
Diff to previous 1.99 (colored)

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").

Revision 1.99 / (download) - annotate - [select for diffs], Sat Jan 1 01:12:09 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.98: +3 -11 lines
Diff to previous 1.98 (colored)

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@.

Revision 1.98 / (download) - annotate - [select for diffs], Thu Dec 30 23:16:18 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.97: +4 -1 lines
Diff to previous 1.97 (colored)

Change from a per-session stack of buffers to one global stack which is
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.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Dec 21 22:37:59 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.96: +27 -34 lines
Diff to previous 1.96 (colored)

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.

Revision 1.96 / (download) - annotate - [select for diffs], Mon Oct 18 20:00:02 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.95: +4 -8 lines
Diff to previous 1.95 (colored)

Merge the before and after attach client code into one in client.c
(instead of two in tmux.c and client.c).

Revision 1.95 / (download) - annotate - [select for diffs], Sat Oct 16 08:31:55 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.94: +1 -3 lines
Diff to previous 1.94 (colored)

Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Sep 26 20:43:30 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.93: +7 -5 lines
Diff to previous 1.93 (colored)

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.

Revision 1.93 / (download) - annotate - [select for diffs], Sun Sep 26 18:51:48 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.92: +17 -6 lines
Diff to previous 1.92 (colored)

Modify the permissions on the socket when adding or removing +x to show
attached sessions, rather than replacing them.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Aug 19 18:29:01 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

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.

Revision 1.91 / (download) - annotate - [select for diffs], Wed Aug 4 19:46:13 2010 UTC (13 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.90: +1 -4 lines
Diff to previous 1.90 (colored)

switch back to kqueue for now, since (a) kqueue has been fixed to deal
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

Revision 1.90 / (download) - annotate - [select for diffs], Sat Jul 24 19:25:32 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.89: +4 -1 lines
Diff to previous 1.89 (colored)

kqueue(2) is currently broken when used with /dev/null and a few other
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.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Jun 21 00:18:57 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.88: +4 -4 lines
Diff to previous 1.88 (colored)

Give tmux sockets (but not the containing folder) group
permissions. This allows hardlinks to the sockets to be used more
easily.

Revision 1.88 / (download) - annotate - [select for diffs], Tue May 4 17:28:16 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.87: +7 -62 lines
Diff to previous 1.87 (colored)

Put this back in with the initialisation in the right order.

Revision 1.87 / (download) - annotate - [select for diffs], Tue May 4 08:48:06 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.86: +61 -7 lines
Diff to previous 1.86 (colored)

Revert last change, it appears to be broken somehow.

Revision 1.86 / (download) - annotate - [select for diffs], Mon May 3 16:06:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.85: +8 -62 lines
Diff to previous 1.85 (colored)

Make signal handler setup/teardown two common functions instead of six,
and reset SIGCHLD after fork to fix problems with some shells. From
Romain Francois.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Apr 6 21:35:44 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.84: +4 -3 lines
Diff to previous 1.84 (colored)

Merge copy mode and output mode, dropping the latter. Idea and code from
Micah Cowan.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Mar 22 19:11:54 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.83: +2 -3 lines
Diff to previous 1.83 (colored)

Nuke unused variable.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Feb 6 23:22:27 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.82: +12 -12 lines
Diff to previous 1.82 (colored)

Use the array.h code for the causes list.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Feb 6 17:15:33 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.81: +30 -27 lines
Diff to previous 1.81 (colored)

Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode
displaying them.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Jan 30 19:05:18 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.80: +5 -1 lines
Diff to previous 1.80 (colored)

Ignore SIGHUP as well.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored)

Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...

Revision 1.79 / (download) - annotate - [select for diffs], Wed Dec 2 15:06:14 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Close the pane if the process died due to a signal, not just if it exited
normally.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.77: +4 -1 lines
Diff to previous 1.77 (colored)

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Nov 13 17:33:07 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.76: +3 -5 lines
Diff to previous 1.76 (colored)

Destroy panes immediately rather than checking them all every loop.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Nov 11 13:24:42 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.75: +2 -1 lines
Diff to previous 1.75 (colored)

Free the pane bufferevent when the fd is closed (the signal could come before
the error callback).

Revision 1.75 / (download) - annotate - [select for diffs], Wed Nov 11 08:00:42 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.74: +4 -7 lines
Diff to previous 1.74 (colored)

Only need to chmod +x or -x the socket when a client is created, lost or
attached, rather than every event loop.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Nov 5 08:50:32 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.73: +1 -2 lines
Diff to previous 1.73 (colored)

EVLOOP_ONCE takes care of the wakeup, so no need to call event_loopexit(NULL).

Revision 1.73 / (download) - annotate - [select for diffs], Thu Nov 5 08:48:15 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.72: +2 -7 lines
Diff to previous 1.72 (colored)

Now all timers are events, there is no longer any need to wake up every 50 ms -
only wake up when an event happens.

Revision 1.72 / (download) - annotate - [select for diffs], Wed Nov 4 23:42:51 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.71: +3 -1 lines
Diff to previous 1.71 (colored)

Move status timer check into the global once-per-second timer, this could maybe
be done better but one every second is better than once every 50 ms.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Nov 4 23:12:43 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.70: +3 -5 lines
Diff to previous 1.70 (colored)

Don't reenlist the client imsg event every loop, instead have a small function
to it and call it after the event triggers or after a imsg is added.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Nov 4 22:47:34 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.69: +2 -1 lines
Diff to previous 1.69 (colored)

Tell the client to exit on configuration file error.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Nov 4 22:43:11 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.68: +1 -2 lines
Diff to previous 1.68 (colored)

Convert the window pane (pty master side) fd over to use a bufferevent.

The evbuffer API is very similar to the existing tmux buffer API so this was
remarkably painless. Not many possible ways to do it, I suppose.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Nov 4 22:40:36 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

Call event_init() before loading the config file, since potentially it could
set up events.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Nov 4 21:04:43 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.66: +3 -5 lines
Diff to previous 1.66 (colored)

Switch jobs over to use a bufferevent.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Nov 4 20:50:11 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.65: +264 -313 lines
Diff to previous 1.65 (colored)

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.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Nov 3 20:29:47 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.64: +7 -5 lines
Diff to previous 1.64 (colored)

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.

Revision 1.64 / (download) - annotate - [select for diffs], Mon Nov 2 12:48:44 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.63: +6 -7 lines
Diff to previous 1.63 (colored)

Reorder slightly to tidy code.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Oct 27 13:03:33 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.62: +5 -88 lines
Diff to previous 1.62 (colored)

Move the poll registration functions into the server-*.c files.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Oct 26 21:42:04 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored)

tabs are better; ok nicm

Revision 1.61 / (download) - annotate - [select for diffs], Mon Oct 26 21:38:18 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.60: +5 -3 lines
Diff to previous 1.60 (colored)

Clear signal flags /before/ taking action and continue afterwards to reduce
chance of dropping signals. Pointed out by deraadt@.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Oct 22 19:41:51 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.59: +122 -878 lines
Diff to previous 1.59 (colored)

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.

Revision 1.59 / (download) - annotate - [select for diffs], Tue Oct 13 06:14:08 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.58: +11 -1 lines
Diff to previous 1.58 (colored)

When a session is unattached, reset its activity timer to prevent it locking
instantly when reattached.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Oct 12 09:29:58 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

Similarly add a tty_cursor_pane function to tidy up most of the calls.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Oct 12 09:16:59 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

_absolute is redundant, just use tty_region.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Oct 12 09:09:35 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.55: +3 -2 lines
Diff to previous 1.55 (colored)

Cleanup: use two functions for region setting, one for absolute and one inside
pane.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Oct 11 10:04:27 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.54: +18 -1 lines
Diff to previous 1.54 (colored)

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@.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Oct 11 08:58:05 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.53: +8 -4 lines
Diff to previous 1.53 (colored)

Switch run-shell over to queue the command in the background like #().

Revision 1.53 / (download) - annotate - [select for diffs], Sun Oct 11 07:20:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.52: +28 -6 lines
Diff to previous 1.52 (colored)

Collect status from dead jobs and don't invoke the callback until both
all input (the socket is closed) and status is available.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Oct 11 07:01:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.51: +5 -5 lines
Diff to previous 1.51 (colored)

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.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Oct 11 00:53:14 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.50: +42 -32 lines
Diff to previous 1.50 (colored)

Braek some bits out of server_fill_client() that aren't really related to
polling into their own function.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Oct 10 18:42:14 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.49: +4 -36 lines
Diff to previous 1.49 (colored)

Put all jobs on a global all_jobs list and use that in server.c instead of
running through all the clients.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Oct 10 15:03:01 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.48: +77 -3 lines
Diff to previous 1.48 (colored)

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.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Oct 10 14:51:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.47: +14 -3 lines
Diff to previous 1.47 (colored)

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.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Oct 10 10:02:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.46: +4 -2 lines
Diff to previous 1.46 (colored)

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.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Oct 10 09:46:11 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.45: +54 -14 lines
Diff to previous 1.45 (colored)

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.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Oct 10 09:31:39 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.44: +145 -75 lines
Diff to previous 1.44 (colored)

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.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Oct 5 18:30:54 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.43: +4 -1 lines
Diff to previous 1.43 (colored)

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.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Sep 24 07:02:56 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.42: +4 -2 lines
Diff to previous 1.42 (colored)

Don't allow locked or suspended clients to limit the size of active clients.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Sep 23 08:21:57 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.41: +31 -25 lines
Diff to previous 1.41 (colored)

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.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Sep 23 06:18:47 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.40: +2 -83 lines
Diff to previous 1.40 (colored)

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.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Sep 22 12:38:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.39: +17 -7 lines
Diff to previous 1.39 (colored)

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.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Sep 20 14:58:12 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.38: +5 -5 lines
Diff to previous 1.38 (colored)

Regularise some fatal messages.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Sep 18 15:19:27 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.37: +25 -14 lines
Diff to previous 1.37 (colored)

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.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Sep 15 07:45:16 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

The default terminal size should be 80x24, not 80x25.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Sep 14 11:25:35 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.35: +1 -14 lines
Diff to previous 1.35 (colored)

Nuke unused server_client_index function, pointed out by martynas@.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Sep 12 13:09:43 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.34: +2 -3 lines
Diff to previous 1.34 (colored)

Doh, trim variables unused now.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Sep 12 13:01:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.33: +5 -15 lines
Diff to previous 1.33 (colored)

Tidy some common code for destroying sessions into a new function.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Sep 10 17:16:24 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".

Revision 1.32 / (download) - annotate - [select for diffs], Mon Sep 7 21:12:12 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.31: +13 -2 lines
Diff to previous 1.31 (colored)

While the display-panes indicator is on screen, make the number keys select the
pane with that index.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 7 21:01:50 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.30: +44 -2 lines
Diff to previous 1.30 (colored)

Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Sep 7 19:08:45 2009 UTC (14 years, 8 months ago) by kili
Branch: MAIN
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Tiny cleanup.

ok nicm@

Revision 1.29 / (download) - annotate - [select for diffs], Sat Sep 5 17:42:16 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Only redraw all clients once when the backoff timer expires rather than every
second all the time.

Reported by Simon Nicolussi.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Sep 4 13:29:10 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.27: +12 -1 lines
Diff to previous 1.27 (colored)

Tell the user when sleeping due to password backoff.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Sep 2 21:25:57 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.26: +3 -4 lines
Diff to previous 1.26 (colored)

When shutting down the server, expect clients to be polite and exit when asked
with the right message.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Aug 31 20:46:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.25: +5 -1 lines
Diff to previous 1.25 (colored)

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.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Aug 31 11:37:27 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.24: +7 -2 lines
Diff to previous 1.24 (colored)

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.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Aug 23 17:29:51 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

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.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 18 21:37:04 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Whoops, getting the comparison the right way round is usually recommended.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Aug 18 21:14:24 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +4 -5 lines
Diff to previous 1.21 (colored)

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.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Aug 14 11:23:34 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.20: +12 -2 lines
Diff to previous 1.20 (colored)

Reset attributes as well as scroll region before poll(2) and add a big comment
explaining why.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Aug 11 22:34:17 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)

Initialise log_fd to -1, prevents spurious disconnection of the client when it
ends up as fd 0 (likely if the server is started with "tmux start").

Also add some extra debugging messages to server.c.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Aug 11 19:32:25 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Drop the no_stop argument to tty_close and tty_free in favour of a flag in the
tty struct.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Aug 11 17:18:35 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.17: +28 -16 lines
Diff to previous 1.17 (colored)

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.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Aug 10 19:42:03 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

Reset the attributes after drawing all or part of the screen, and reset the
region before poll(2). This reduces (but does not eliminate) the chance of the
attributes not being normal if tmux is disconnected without warning (ssh ~.,
reboot from inside, etc).

Revision 1.16 / (download) - annotate - [select for diffs], Fri Aug 7 15:39:10 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.15: +47 -40 lines
Diff to previous 1.15 (colored)

If there is an error in the configuration file, don't just exit(1) as this can
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.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jul 28 07:03:32 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.14: +3 -1 lines
Diff to previous 1.14 (colored)

Next step towards customisable mode keys: build each default table of keys into
a named tree on start and use that for lookups. Also add command to string
translation tables and modify list-keys to show the the mode key bindings (new
-t argument).

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jul 24 14:52:47 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.13: +9 -4 lines
Diff to previous 1.13 (colored)

Permit commands to be bound to key presses without the prefix key first. The
new -n flag to bind-key and unbind-key sets or removes these bindings, and
list-key shows them in []s.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jul 21 19:54:22 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.12: +9 -9 lines
Diff to previous 1.12 (colored)

Make some functions which return unused values void (mostly found by lint) and
tweak a redundant expression in window_pane_set_mode.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jul 20 14:37:51 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.11: +13 -1 lines
Diff to previous 1.11 (colored)

Display the number of failed password attempts (if any) when the server is
locked. From Tom Doherty.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Jul 19 13:21:40 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.10: +5 -3 lines
Diff to previous 1.10 (colored)

Improved layout code.

Each window now has a tree of layout cells associated with it. In this tree,
each node is either a horizontal or vertical cell containing a list of other
cells running from left-to-right or top-to-bottom, or a leaf cell which is
associated with a pane.

The major functional changes are:

- panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and
  vertically (splitw -v, C-b ");
- panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D,
  bound to C-b left/right/up/down and C-b M-left/right/up/down);
- layouts are now applied and then may be modified by resizing or splitting
  panes, rather than being fixed and reapplied when the window is resized or
  panes are added;
- manual-vertical layout is no longer necessary, and active-only layout is gone
  (but may return in future);
- the main-pane layouts now reduce the size of the main pane to fit all panes
  if possible.

Thanks to all who tested.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 18 14:59:25 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.9: +73 -17 lines
Diff to previous 1.9 (colored)

Add three new session options: visual-activity, visual-bell, visual-content. If
these are enabled (and the monitor-activity, bell-actio and monitor-content
options are configurated appropriately), when activity, a bell, or content is
detected, a message is shown.

Also tidy up the bell/activity/content code in server.c slightly and fix a
couple of errors.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jul 14 19:03:16 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

Instead of faking up a status line in status_redraw, use the same code to
redraw it as to draw the entire screen, just skip all lines but the last.

This makes horizontal split redraw properly when the status line is off.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jul 12 17:33:18 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +4 -1 lines
Diff to previous 1.7 (colored)

Creating a key binding which replaces itself (such as "bind x bind x lsw")
frees the command list bound to the key while it is still being executed,
leading to a use after free. To prevent this, create a dead keys list and defer
freeing replaced or removed key bindings until the main loop when the key
binding will have finished executing.

Found by Johan Friis when creating a key binding to reload his configuration
file.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jul 12 16:07:56 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.6: +12 -1 lines
Diff to previous 1.6 (colored)

If it exist, load a system-wide configuration file /etc/tmux.conf before any
user-specified one.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jul 7 19:49:19 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +6 -8 lines
Diff to previous 1.5 (colored)

Rename the global options variables to be shorter and to make session options
clear. No functional change, getting this out of the way to make later options
changes easier.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jun 26 22:12:19 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.4: +15 -2 lines
Diff to previous 1.4 (colored)

After logging (if enabled) is switched to file, there is no reason to keep
stdin/stdout/stderr active, so dup them to /dev/null.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jun 25 22:09:20 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Remove some dead assignments, found by sthen with clang.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 24 22:49:56 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Change find-window and monitor-content to use fnmatch(3). For convenience and
compatibility, *s are implicitly added at the start and end of the pattern.

Also display the line number and the entire line in the results, and lose the
nasty section_string function and the now empty util.c file.

Initially from Tiago Cunha.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 24 17:36:15 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1: +11 -6 lines
Diff to previous 1.1 (colored)

Make remain-on-exit work again when there is only one pane left, which was
broken sometime during the pane/layout changes. Reported/tested by Iain Morgan,
thanks.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

Import tmux, a terminal multiplexor allowing (among other things) a single
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

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.