diff options
author | 2015-11-24 21:32:36 +0000 | |
---|---|---|
committer | 2015-11-24 21:32:36 +0000 | |
commit | fca48d3ec3b84f5084c26520d8c5125e4ed08bde (patch) | |
tree | 9d38636e38d96aac7657d5e1e97d3d1a5753dbd2 /usr.bin/tmux/proc.c | |
parent | regen (diff) | |
download | wireguard-openbsd-fca48d3ec3b84f5084c26520d8c5125e4ed08bde.tar.xz wireguard-openbsd-fca48d3ec3b84f5084c26520d8c5125e4ed08bde.zip |
Log some system and libevent information at startup.
Diffstat (limited to 'usr.bin/tmux/proc.c')
-rw-r--r-- | usr.bin/tmux/proc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/tmux/proc.c b/usr.bin/tmux/proc.c index 68decb66aef..c0b27755ef0 100644 --- a/usr.bin/tmux/proc.c +++ b/usr.bin/tmux/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.5 2015/11/24 21:19:46 nicm Exp $ */ +/* $OpenBSD: proc.c,v 1.6 2015/11/24 21:32:36 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net> @@ -19,6 +19,7 @@ #include <sys/types.h> #include <sys/queue.h> #include <sys/uio.h> +#include <sys/utsname.h> #include <errno.h> #include <event.h> @@ -170,6 +171,7 @@ proc_start(const char *name, struct event_base *base, int forkflag, void (*signalcb)(int)) { struct tmuxproc *tp; + struct utsname u; if (forkflag) { switch (fork()) { @@ -191,8 +193,13 @@ proc_start(const char *name, struct event_base *base, int forkflag, log_open(name); setproctitle("%s (%s)", name, socket_path); + if (uname(&u) < 0) + memset(&u, 0, sizeof u); + log_debug("%s started (%ld): socket %s, protocol %d", name, (long)getpid(), socket_path, PROTOCOL_VERSION); + log_debug("on %s %s %s; libevent %s (%s)", u.sysname, u.release, + u.version, event_get_version(), event_get_method()); tp = xcalloc(1, sizeof *tp); tp->name = xstrdup(name); |