mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
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.
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "tmux.h"
|
||||
|
||||
@ -124,6 +125,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");
|
||||
|
Reference in New Issue
Block a user