diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-10-11 23:30:28 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-10-11 23:30:28 +0000 |
commit | 91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096 (patch) | |
tree | b5fe84fa223ed89dd3c17d43a56c7c0bb4ef93eb /session.c | |
parent | a4ea6a9d19ef9dc4290a9cd15e352a414198d268 (diff) | |
download | rtmux-91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096.tar.gz rtmux-91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096.tar.bz2 rtmux-91e4dc83fcfa8c2d4a318d5f23dcebbaeeea2096.zip |
Sync OpenBSD patchset 370:
Support for individual session idle time locking. May be enabled by turning off
the lock-server option (it is on by default). When this is off, each session
locks when it has been idle for the lock-after-time setting. When on, the
entire server locks when ALL sessions have been idle for their individual
lock-after-time settings.
This replaces one global-only option (lock-after-time) with another
(lock-server), but the default behaviour is usually preferable so there don't
seem to be many alternatives.
Diff/idea largely from Thomas Adam, tweaked by me.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: session.c,v 1.67 2009-09-20 22:11:27 tcunha Exp $ */ +/* $Id: session.c,v 1.68 2009-10-11 23:30:28 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -22,6 +22,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include <time.h> #include "tmux.h" @@ -123,6 +124,7 @@ session_create(const char *name, const char *cmd, const char *cwd, s = xmalloc(sizeof *s); s->references = 0; s->flags = 0; + s->activity = time(NULL); if (gettimeofday(&s->tv, NULL) != 0) fatal("gettimeofday failed"); |