-/* $OpenBSD: options-table.c,v 1.94 2017/10/25 14:14:52 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.95 2018/02/22 10:54:51 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
.default_num = 500
},
+ { .name = "exit-empty",
+ .type = OPTIONS_TABLE_FLAG,
+ .scope = OPTIONS_TABLE_SERVER,
+ .default_num = 1
+ },
+
{ .name = "exit-unattached",
.type = OPTIONS_TABLE_FLAG,
.scope = OPTIONS_TABLE_SERVER,
-/* $OpenBSD: server.c,v 1.178 2017/12/19 15:00:39 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.179 2018/02/22 10:54:51 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
server_client_loop();
+ if (!options_get_number(global_options, "exit-empty") && !server_exit)
+ return (0);
+
if (!options_get_number(global_options, "exit-unattached")) {
if (!RB_EMPTY(&sessions))
return (0);
-.\" $OpenBSD: tmux.1,v 1.591 2018/01/16 09:00:38 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.592 2018/02/22 10:54:51 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: January 16 2018 $
+.Dd $Mdocdate: February 22 2018 $
.Dt TMUX 1
.Os
.Sh NAME
waits after an escape is input to determine if it is part of a function or meta
key sequences.
The default is 500 milliseconds.
+.It Xo Ic exit-empty
+.Op Ic on | off
+.Xc
+If enabled (the default), the server will exit when there are no active
+sessions.
.It Xo Ic exit-unattached
.Op Ic on | off
.Xc