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@.
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.
- 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.
stdin up to the server, I forgot one essential point - the tmux server
could now be both the producer and consumer. This happens when tmux is
run inside tmux, as well as when piping tmux commands together.
So, using stdio(3) was a bad idea - if sufficient data was written, this
could block in write(2). When that happened and the server was both
producer and consumer, it deadlocks.
Change to use libevent bufferevents for the client stdin, stdout and
stderr instead. This is trivial enough for output but requires a
callback mechanism to trigger when stdin is finished.
This relies on the underlying polling mechanism for libevent to work
with whatever devices to which the user could redirect stdin, stdout or
stderr, hence the change to use poll(2) over kqueue(2) for tmux.
destroy the same pane (because the first one doesn't remove it from the
list of panes), causing the pane bufferevent to be freed twice. So don't
free it if the fd has already been set to -1, from Romain Francoise.
replaced with link-window -k. This prevents it being pushed onto the last
window stack and causing a use-after-free.
Only took me an hour to find this :-/...
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.
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.
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.
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.
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.
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.
still present, so add a separate prompt free callback and make the _clear
function responsible for calling it if necessary (rather than the individual
prompt callbacks). Also make both messages and prompts clear any existing when
a new is set.
In addition, the screen could be modified while the prompt is there, restore
the redraw-entire-screen behaviour on prompt clear; add a comment as a
reminder.
prompt (such as the one issuing the unlock request).
This caused the server to die if the wrong password was entered when unlocking
from the command line with -U (nasty).
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