diff options
author | 2009-10-05 18:30:54 +0000 | |
---|---|---|
committer | 2009-10-05 18:30:54 +0000 | |
commit | 60ea609570baf8cfc3b5d4cfd8607ca6cfe1831b (patch) | |
tree | 96d05b47e74d3f5f854829f1d9874f753805ebd5 /usr.bin/tmux/server.c | |
parent | Don't drop the big lock at the end of exit1(), but move it into the middle of (diff) | |
download | wireguard-openbsd-60ea609570baf8cfc3b5d4cfd8607ca6cfe1831b.tar.xz wireguard-openbsd-60ea609570baf8cfc3b5d4cfd8607ca6cfe1831b.zip |
If no target client is specified to commands which accept one, try to guess the
current client, in a similar manner to how sessions already work: if the
current session can be established and has only one client, use that; otherwise
use the most recently created client.
Diffstat (limited to 'usr.bin/tmux/server.c')
-rw-r--r-- | usr.bin/tmux/server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index e46c713eb5e..c60347bf458 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.43 2009/09/24 07:02:56 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.44 2009/10/05 18:30:54 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -90,6 +90,9 @@ server_create_client(int fd) c = xcalloc(1, sizeof *c); c->references = 0; imsg_init(&c->ibuf, fd); + + if (gettimeofday(&c->tv, NULL) != 0) + fatal("gettimeofday failed"); ARRAY_INIT(&c->prompt_hdata); |