Thomas Adam
1394420c37
Merge branch 'obsd-master'
2016-03-30 16:01:19 +01:00
nicm
ec82fcdfea
Bump the listen() backlog up, some people have scripts that run up a lot
...
of clients quickly.
2016-03-30 13:20:07 +00:00
Thomas Adam
dc42c35f1f
Merge branch 'obsd-master'
2016-01-19 18:01:15 +00:00
nicm
995af0e2b7
I no longer use my SourceForge address so replace it.
2016-01-19 15:59:12 +00:00
Thomas Adam
e0cae08c04
Merge branch 'obsd-master'
2015-12-17 00:01:08 +00:00
nicm
021c64310d
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.
2015-12-16 21:50:37 +00:00
Thomas Adam
1a33ea9671
Merge branch 'obsd-master'
2015-12-15 02:01:14 +00:00
nicm
12da13c9d1
Make the marked pane a cmd_find_state.
2015-12-15 00:00:01 +00:00
Thomas Adam
890d8da2e3
Merge branch 'obsd-master'
...
Conflicts:
log.c
proc.c
tmux.c
2015-11-25 16:37:30 +00:00
nicm
dca93c56e0
Do lock failures slightly better, return a special value so we don't
...
unlink the wrong thing.
2015-11-24 23:01:51 +00:00
nicm
1e2df2d464
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}')
2015-11-24 21:52:06 +00:00
nicm
9cccb8c115
Make the log stuff a bit tidier with some helper functions.
2015-11-24 21:19:46 +00:00
Thomas Adam
d63de1e407
Merge branch 'obsd-master'
...
Conflicts:
server.c
tmux.c
2015-11-23 21:20:54 +00:00
nicm
01a2ddf3f8
Add getpw to pledge, makes tmux work in YP environments, discovered by
...
matthieu, ok deraadt
2015-11-22 19:41:19 +00:00
Thomas Adam
7fe8edc396
Merge branch 'obsd-master'
2015-11-18 16:01:23 +00:00
nicm
577c0e3e5a
Use __unused rather than rolling our own.
2015-11-18 14:27:44 +00:00
Thomas Adam
8213558cc7
Merge branch 'obsd-master'
...
Conflicts:
server.c
tmux.c
2015-11-15 22:49:25 +00:00
nicm
a582b62287
Accidentally turned off pledge, turn it back on.
2015-11-15 14:32:48 +00:00
Thomas Adam
7b749eff35
Merge branch 'obsd-master'
...
Conflicts:
server.c
tmux.c
2015-11-14 11:38:30 +00:00
nicm
c56b81a2ce
Push stdout and stderr to clients more aggressively, and add an event to
...
continue if the send fails.
2015-11-14 09:41:06 +00:00
Thomas Adam
4f88344df3
Merge branch 'obsd-master'
2015-11-12 14:01:14 +00:00
nicm
d6daf37df4
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.
2015-11-12 12:19:57 +00:00
Thomas Adam
c975de2e07
Merge branch 'obsd-master'
...
Conflicts:
server.c
2015-10-31 23:56:35 +00:00
nicm
abb4e9e2fa
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.
2015-10-31 13:12:03 +00:00
Thomas Adam
da1f6fc2c8
Merge branch 'obsd-master'
...
Conflicts:
Makefile
client.c
server-client.c
server.c
tmux.c
tmux.h
2015-10-27 23:27:26 +00:00
nicm
44657bf932
Move struct options into options.c.
2015-10-27 15:58:42 +00:00
nicm
07b0ea03c3
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.
2015-10-27 13:23:24 +00:00
Nicholas Marriott
7930cb54c0
ifdef __OpenBSD__ around pledge().
2015-10-25 09:31:46 +00:00
Thomas Adam
4acc8d0ff5
Merge branch 'obsd-master'
...
Conflicts:
cmd-find.c
2015-10-25 09:21:37 +00:00
nicm
5383b047d1
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".
2015-10-23 16:07:29 +00:00
Thomas Adam
8c39813665
Merge branch 'obsd-master'
2015-10-22 14:01:12 +01:00
Thomas Adam
6bc3902f5d
Merge branch 'obsd-master'
2015-10-22 12:01:09 +01:00
nicm
515dfea4b7
This should not be changed.
2015-10-22 10:48:30 +00:00
nicm
31fd071faa
Rename shutdown to exit.
2015-10-22 10:46:24 +00:00
Thomas Adam
f69e09a67e
Merge branch 'obsd-master'
2015-10-11 02:01:14 +01:00
guenther
241fd72f75
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@
2015-10-11 00:26:23 +00:00
Thomas Adam
76688d2040
Merge branch 'obsd-master'
...
Conflicts:
cfg.c
tmux.c
2015-09-06 20:47:50 +01:00
nicm
83157c02d6
Move initial conf load into cfg.c.
2015-09-01 10:01:56 +00:00
nicm
dd92b6e83d
Event base does not need to be global.
2015-08-30 22:19:07 +00:00
Thomas Adam
cb89f2f2a1
Merge branch 'obsd-master'
...
Conflicts:
Makefile
format.c
2015-08-30 21:44:01 +01:00
nicm
b9f0571780
We already loop over the windows in server_client_loop, so don't do it
...
again in server_loop just to check names.
2015-08-29 08:54:41 +00:00
nicm
b5aaefc727
Move alerts onto events rather than checking every loop.
2015-08-29 08:30:54 +00:00
Thomas Adam
486421ceff
Merge branch 'obsd-master'
2015-08-28 16:01:09 +01:00
nicm
f957db81d9
Remove unused prototypes.
2015-08-28 13:21:25 +00:00
nicm
f6a0f8730e
Per-session timers for locking, and remove the global one-second timer.
2015-08-28 13:12:20 +00:00
Thomas Adam
84eabb2658
Merge branch 'obsd-master'
2015-08-28 14:01:11 +01:00
nicm
675def0396
Remove the lock-server option which is a bit redundant, it isn't that
...
different without it.
2015-08-28 12:31:55 +00:00
nicm
6419f66523
Give clock mode its own timer.
2015-08-28 12:25:42 +00:00
nicm
75d10058a4
Run status update on a per-client timer at status-interval.
2015-08-28 12:16:28 +00:00
nicm
b6618b631b
Move format job cleanup onto its own timer.
2015-08-28 11:38:27 +00:00
Thomas Adam
18a64ad52d
Merge branch 'obsd-master'
2015-07-20 18:01:10 +01:00
nicm
92af3766ec
Add an option (history-file) for a file to save/restore command prompt
...
history, from Olof-Joachim Frahm.
2015-07-20 15:50:04 +00:00
Thomas Adam
7acc4addb5
Merge branch 'obsd-master'
...
Conflicts:
client.c
tmux.1
tmux.c
2015-06-07 23:42:25 +01:00
nicm
641a9cd3f5
Similarly, for sessions use a callback to free rather than checking
...
every loop.
2015-06-05 18:18:32 +00:00
nicm
8c93b768e4
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.
2015-06-05 18:01:12 +00:00
Thomas Adam
02e348c069
Merge branch 'obsd-master'
2015-06-04 12:59:41 +01:00
nicm
a863834574
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).
2015-06-04 11:43:51 +00:00
Thomas Adam
b675e6b2d5
Merge branch 'obsd-master'
2015-06-01 12:01:17 +01:00
nicm
58b50fb543
Clear signal handlers before event_reinit as apparently it can otherwise
...
cause libevent to go strange.
2015-06-01 09:20:19 +00:00
Thomas Adam
7712e6f82b
Merge branch 'obsd-master'
2015-06-01 02:01:17 +01:00
deraadt
7e067cb9dc
does not need syslog.h
2015-05-31 23:27:06 +00:00
Thomas Adam
beffdf6575
Merge branch 'obsd-master'
2015-05-27 16:01:22 +01:00
nicm
379400cfa6
Move the jobs output cache into the formats code so that #() work more
...
generally (for example, again working in set-titles-string).
2015-05-27 13:28:04 +00:00
Thomas Adam
56e1132db4
Merge branch 'obsd-master'
2015-04-25 10:02:46 +00:00
nicm
aeedb464a6
Convert clients list into a TAILQ.
2015-04-24 23:17:11 +00:00
nicm
8d66f4fba4
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.
2015-04-22 15:30:11 +00:00
nicm
89e80cabd5
window_index is only used in one place (window_destroy) so inline it there.
2015-04-22 15:05:03 +00:00
Thomas Adam
0a88377086
Merge branch 'obsd-master'
2015-04-22 10:05:54 +01:00
nicm
93b2871cab
Do not die on USR1 if any of the socket parent directories are
...
missing. Reported by Robin Powell.
2015-04-21 22:32:40 +00:00
Thomas Adam
5f8138faf5
Merge branch 'obsd-master'
...
Conflicts:
format.c
2014-12-19 19:22:19 +00:00
nicm
7a0c94b28a
Add pane_dead_status for exit status of dead panes.
2014-12-09 19:23:35 +00:00
Nicholas Marriott
747cab4281
No need for $Id$ now.
2014-11-08 12:27:43 +00:00
Thomas Adam
35ffd093d7
Merge branch 'obsd-master'
...
Conflicts:
Makefile
cmd-link-window.c
cmd-unlink-window.c
2014-10-29 12:51:21 +00:00
nicm
b496b1fe11
Move cfg_causes local into cfg.c and remove struct causelist.
2014-10-27 22:23:47 +00:00
Thomas Adam
2874a431c0
Merge branch 'obsd-master'
2014-09-25 11:29:54 +01:00
nicm
733cea8847
Wake up any clients waiting with the wait-for command when the server
...
exits.
2014-09-01 21:58:41 +00:00
Thomas Adam
a131b82e95
Merge branch 'obsd-master'
...
Conflicts:
client.c
2014-08-09 20:31:36 +01:00
nicm
8e4ae12b4d
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.
2014-07-21 10:52:48 +00:00
Thomas Adam
814e40522c
Merge branch 'obsd-master'
2014-06-20 12:59:43 +01:00
nicm
53cbae544f
Now that cmdlists are reference counted, there is no need for two-step
...
deletion via the dead_key_bindings tree. From Keith Amling.
2014-05-14 06:21:19 +00:00
Thomas Adam
3f54c9292f
Merge branch 'obsd-master'
2014-04-24 12:59:00 +01:00
nicm
bec6c807cd
There is no longer a need for a paste_stack struct or for global_buffers
...
to be global. Move to paste.c.
2014-04-24 09:14:43 +00:00
Thomas Adam
953c3ef47a
Merge branch 'obsd-master'
...
Conflicts:
Makefile
tmux.1
window.c
2014-04-23 11:26:11 +01:00
nicm
a5d4b7f3d9
Some more long lines.
2014-04-17 14:45:49 +00:00
Thomas Adam
3e498cdb49
Merge branch 'obsd-master'
2013-11-14 07:51:26 +00:00
nicm
bf35441608
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.
2013-10-20 17:28:43 +00:00
Nicholas Marriott
e323101ede
Rename global configuration define.
2013-04-24 10:01:32 +00:00
Nicholas Marriott
4f3c31a6b6
Use sysconfdir for the location of global tmux.conf (but default it to /etc),
...
based on changes from Dagobert Michelsen.
2013-04-24 10:57:03 +01:00
Nicholas Marriott
20636d956d
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.
2013-03-24 09:54:10 +00:00
Nicholas Marriott
8d59b189cc
No more lint means no more ARGSUSED.
2013-03-22 10:31:22 +00:00
Nicholas Marriott
3964309c67
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.
2013-02-23 22:25:58 +00:00
Nicholas Marriott
9d165df18a
No more lint means no more ARGSUSED.
2013-02-17 23:15:38 +00:00
Thomas Adam
fb83914bd7
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-12-08 20:29:37 +00:00
Nicholas Marriott
8378be03d1
Fix argument order in a log statement.
2012-12-06 12:49:13 +00:00
Thomas Adam
c04aa90207
Merge branch 'obsd-master'
...
Sync from OpenBSD.
* obsd-master:
Add halfpage commands to mode command string table (missed by accident), from Thomas Adam.
Clarify some points about config files, notably that they are only read at server start. From Thomas Adam.
Use a utility function for common code to show errors in config file, from Thomas Adam.
2012-11-22 13:24:14 +00:00
Nicholas Marriott
827b311c81
Use a utility function for common code to show errors in config file,
...
from Thomas Adam.
2012-11-19 10:38:06 +00:00
Tiago Cunha
a432fcd306
Sync OpenBSD patchset 1150:
...
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-11 19:34:16 +00:00
Nicholas Marriott
df912e3540
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-10 11:53:01 +00:00
Tiago Cunha
bae2701289
Sync OpenBSD patchset 1092:
...
Stop accepting new clients for 1 second on EMFILE/ENFILE. Based on
ongoing fixes to other daemons by Theo.
2012-04-12 12:43:40 +00:00
Nicholas Marriott
6703ca8d26
Stop accepting new clients for 1 second on EMFILE/ENFILE. Based on
...
ongoing fixes to other daemons by Theo.
2012-04-11 06:16:14 +00:00