OpenBSD CVS

CVS log for src/usr.bin/tmux/Attic/server-msg.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25, Thu Oct 22 19:41:51 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.24: +1 -1 lines
FILE REMOVED

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.24 / (download) - annotate - [select for diffs], Wed Oct 21 20:16:40 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

Don't try to unsuspend a client if it isn't suspended.

Revision 1.23 / (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.22: +5 -3 lines
Diff to previous 1.22 (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.22 / (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.21: +2 -1 lines
Diff to previous 1.21 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Wed Sep 23 12:03:31 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.20: +26 -1 lines
Diff to previous 1.20 (colored)

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.

Revision 1.20 / (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.19: +3 -20 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Wed Sep 23 06:12:58 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.18: +7 -33 lines
Diff to previous 1.18 (colored)

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.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Sep 23 06:05:02 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.17: +11 -10 lines
Diff to previous 1.17 (colored)

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.

Revision 1.17 / (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.16: +3 -3 lines
Diff to previous 1.16 (colored)

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

Revision 1.16 / (download) - annotate - [select for diffs], Wed Sep 2 16:38:35 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.15: +9 -2 lines
Diff to previous 1.15 (colored)

When incorrect passwords are entered, behave similarly to login(1) and backoff
for a bit. Based on a diff from martynas@.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Aug 23 16:45:00 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored)

The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Aug 13 12:15:45 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.13: +5 -1 lines
Diff to previous 1.13 (colored)

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

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

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.

Revision 1.12 / (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.11: +2 -2 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (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.10: +33 -25 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Sat Aug 8 21:52:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.9: +11 -1 lines
Diff to previous 1.9 (colored)

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

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 30 16:40:12 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.8: +101 -144 lines
Diff to previous 1.8 (colored)

Similar changes for server_msg_dispatch: use a switch instead of a lookup table
and merge smaller functions inline.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jul 29 14:17:26 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jul 26 12:58:44 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.6: +53 -42 lines
Diff to previous 1.6 (colored)

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.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jul 23 21:19:11 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.5: +17 -30 lines
Diff to previous 1.5 (colored)

None of the server message functions return anything but 0, so make them all
void.

Also remove a leftover variable in client.c.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jul 7 17:24:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

Handle empty or unset TERM correctly; also fix a fatal() message while here.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 7 12:34:47 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

When sending a "protocol mismatch" error message, tell the client to exit
afterwards, otherwise it hangs.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jun 5 11:14:13 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

Terminate cwd buffer before running xstrdup on it.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 4 21:43:24 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1: +4 -3 lines
Diff to previous 1.1 (colored)

If the prompt is hidden or a password is sent with -U, zero it before freeing
it.

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.