summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-08-28 12:31:56 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-08-28 12:31:56 +0000
commitdf7c3d11b4f76b2df4cb36445cc1109db51ff25d (patch)
treea93b22129f9a2462f8925ffd24ff6e2055282bc6 /usr.bin
parentfd255b98b71d4b95733f60dd397bf2f7978ac73a (diff)
Remove the lock-server option which is a bit redundant, it isn't that
different without it.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/options-table.c7
-rw-r--r--usr.bin/tmux/server.c29
-rw-r--r--usr.bin/tmux/tmux.121
3 files changed, 6 insertions, 51 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c
index c7d78b41e16..b9f374280c5 100644
--- a/usr.bin/tmux/options-table.c
+++ b/usr.bin/tmux/options-table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options-table.c,v 1.61 2015/07/20 15:50:04 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.62 2015/08/28 12:31:55 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -206,11 +206,6 @@ const struct options_table_entry session_options_table[] = {
.default_str = "lock -np"
},
- { .name = "lock-server",
- .type = OPTIONS_TABLE_FLAG,
- .default_num = 1
- },
-
{ .name = "message-attr",
.type = OPTIONS_TABLE_ATTRIBUTES,
.default_num = 0,
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index 5056f277e4a..83ff9513135 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.132 2015/08/28 12:25:42 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.133 2015/08/28 12:31:55 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -64,7 +64,6 @@ void server_child_signal(void);
void server_child_exited(pid_t, int);
void server_child_stopped(pid_t, int);
void server_second_callback(int, short, void *);
-void server_lock_server(void);
void server_lock_sessions(void);
/* Set marked pane. */
@@ -506,10 +505,7 @@ server_second_callback(unused int fd, unused short events, unused void *arg)
{
struct timeval tv;
- if (options_get_number(&global_s_options, "lock-server"))
- server_lock_server();
- else
- server_lock_sessions();
+ server_lock_sessions();
evtimer_del(&server_ev_second);
memset(&tv, 0, sizeof tv);
@@ -517,27 +513,6 @@ server_second_callback(unused int fd, unused short events, unused void *arg)
evtimer_add(&server_ev_second, &tv);
}
-/* Lock the server if ALL sessions have hit the time limit. */
-void
-server_lock_server(void)
-{
- struct session *s;
- int timeout;
- time_t t;
-
- t = time(NULL);
- RB_FOREACH(s, sessions, &sessions) {
- if (s->flags & SESSION_UNATTACHED)
- continue;
- timeout = options_get_number(&s->options, "lock-after-time");
- if (timeout <= 0 || t <= s->activity_time.tv_sec + timeout)
- return; /* not timed out */
- }
-
- server_lock();
- recalculate_sizes();
-}
-
/* Lock any sessions which have timed out. */
void
server_lock_sessions(void)
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 509b0721267..8fc827b0b0f 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.447 2015/08/12 08:55:20 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.448 2015/08/28 12:31:55 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" 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: August 12 2015 $
+.Dd $Mdocdate: August 28 2015 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -2561,9 +2561,7 @@ Lock the session (like the
.Ic lock-session
command) after
.Ar number
-seconds of inactivity, or the entire server (all sessions) if the
-.Ic lock-server
-option is set.
+seconds of inactivity.
The default is not to lock (set to 0).
.It Ic lock-command Ar shell-command
Command to run when locking each client.
@@ -2571,19 +2569,6 @@ The default is to run
.Xr lock 1
with
.Fl np .
-.It Xo Ic lock-server
-.Op Ic on | off
-.Xc
-If this option is
-.Ic on
-(the default),
-instead of each session locking individually as each has been
-idle for
-.Ic lock-after-time ,
-the entire server will lock after
-.Em all
-sessions would have locked.
-This has no effect as a session option; it must be set as a global option.
.It Ic message-command-style Ar style
Set status line message command style, where
.Ar style