Commit Graph

513 Commits (b28b8312f2a40d3fe7321375b91329eca4efb698)

Author SHA1 Message Date
Thomas Adam 98ee93bde3 Merge branch 'obsd-master' 2019-05-20 15:02:40 +01:00
nicm e128c7fcd8 Replace the various identical error callbacks with a single one in cmd-queue.c. 2019-05-20 11:46:06 +00:00
nicm 78287e27c8 Break new window and pane creation common code from various commands and
window.c into a separate file spawn.c.
2019-04-17 14:37:48 +00:00
Nicholas Marriott 5ece386cdf Break new window and pane creation common code from various commands and
window.c into a separate file spawn.c.
2019-04-07 13:01:03 +01:00
Thomas Adam da5d563375 Merge branch 'obsd-master' 2018-08-23 19:02:40 +01:00
nicm bceccc6b63 Move job struct into job.c. 2018-08-23 15:45:05 +00:00
Thomas Adam e811132b05 Merge branch 'obsd-master' 2018-08-18 23:02:40 +01:00
nicm bd2896b65e SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.
2018-08-18 20:08:52 +00:00
Thomas Adam eceaa9a493 Merge branch 'obsd-master' 2018-08-02 15:02:25 +01:00
nicm fb1f0fee5a session_groups can be static also. 2018-08-02 11:56:12 +00:00
Thomas Adam 9fd9952752 Merge branch 'obsd-master' 2018-03-08 10:02:26 +00:00
nicm 19f3a5c612 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.
2018-03-08 08:09:10 +00:00
Thomas Adam c2aa40449c Merge branch 'obsd-master' 2018-02-22 12:02:31 +00:00
nicm 623f4b12d3 Add exit-empty option to exit server if no sessions (defaults to on). 2018-02-22 10:54:51 +00:00
Thomas Adam 74ecc866cf Merge branch 'obsd-master' 2017-12-19 16:01:20 +00:00
nicm b20a00f93e Report better error from server when socket create fails, GitHub issue
1201.
2017-12-19 15:00:39 +00:00
Thomas Adam 31901e3c07 Merge branch 'obsd-master'
Conflicts:
	server-fn.c
2017-10-20 12:36:29 +01:00
nicm a5fd5782f8 Show exit status and time in the remain-on-exit pane text, mostly from
Timo Boettcher in GitHub issue 1103.
2017-10-12 11:32:27 +00:00
Thomas Adam acbbc93501 Merge branch 'obsd-master' 2017-07-14 22:01:10 +01:00
nicm 932f6cfbfc 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).
2017-07-14 18:49:07 +00:00
Thomas Adam 1076a2e26c Merge branch 'obsd-master'
Conflicts:
	cmd-pipe-pane.c
	proc.c
	tmux.c
	window.c
2017-07-12 13:43:08 +01:00
nicm 51112221ee 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.
2017-07-12 10:04:51 +00:00
nicm 0453ad0146 Move signal code into proc.c. 2017-07-12 09:24:17 +00:00
Thomas Adam fbbf5a108b Merge branch 'obsd-master' 2017-07-10 00:01:15 +01:00
nicm 58b796608f Some extra logging to show why tmux might exit. 2017-07-09 22:33:09 +00:00
Thomas Adam 4e01036cb6 Merge branch 'obsd-master' 2017-07-03 10:01:14 +01:00
nicm 28687f2d55 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.
2017-07-03 08:16:03 +00:00
Thomas Adam e62e17d046 Merge branch 'obsd-master'
Conflicts:
	tmux.1
	window.c
2017-06-05 11:59:38 +01:00
nicm adf5628087 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.
2017-06-04 08:25:57 +00:00
Thomas Adam d8398af770 Merge branch 'obsd-master' 2017-04-22 08:01:54 +01:00
nicm 2c9bdd9e32 Memory leaks, from David CARLIER. 2017-04-22 06:13:30 +00:00
Thomas Adam fd13731049 Merge branch 'obsd-master' 2017-04-21 22:01:14 +01:00
nicm efaf4c16cf 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.
2017-04-21 20:26:34 +00:00
Thomas Adam 4612419c14 Merge branch 'obsd-master' 2017-04-21 16:01:18 +01:00
nicm 428be9803c 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.
2017-04-21 14:04:54 +00:00
Thomas Adam 48371216df Merge branch 'obsd-master' 2017-04-20 12:01:14 +01:00
nicm 0b44ad99b5 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...
2017-04-20 09:20:22 +00:00
Thomas Adam 02e04477de Merge branch 'obsd-master'
Conflicts:
	server.c
2017-02-14 13:55:16 +00:00
nicm c6a3446398 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.
2017-02-09 15:04:53 +00:00
Nicholas Marriott ea70e68a51 -paths.h. 2017-01-25 16:39:02 +00:00
Nicholas Marriott 0f9354eec2 Bad merge. 2017-01-25 16:38:13 +00:00
Nicholas Marriott a3d5bfcece Define away pledge() on !OpenBSD. 2017-01-23 12:27:58 +00:00
Thomas Adam 7177eeaa42 Merge branch 'obsd-master' 2016-11-12 20:01:10 +00:00
nicm b7398a4918 Do not execute commands for a client until it has identified, fixes
problem reported by Frank Terbeck.
2016-11-12 19:04:41 +00:00
Thomas Adam 1a6e696b08 Merge branch 'obsd-master' 2016-10-16 22:01:14 +01:00
nicm 026ad08b56 Notifys can go via the command queue instead of using their own queue. 2016-10-16 19:15:02 +00:00
Thomas Adam c67b702588 Merge branch 'obsd-master' 2016-10-16 20:01:10 +01:00
nicm ddc4512d2e 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.
2016-10-16 17:55:14 +00:00
Thomas Adam 623e54788e Merge branch 'obsd-master' 2016-10-15 02:01:12 +01:00
nicm 9b3ae84993 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).
2016-10-15 00:01:01 +00:00