diff options
author | nicm <nicm> | 2015-06-14 10:07:44 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-06-14 10:07:44 +0000 |
commit | 29c29e771767b037f2929b889bb0de2b0b6ee138 (patch) | |
tree | 28d2497e9fd6f69da442ed01f1e431bb51f9561c /format.c | |
parent | bbc0898060a02515461cbd90d7af35bf91d9cb3d (diff) | |
download | rtmux-29c29e771767b037f2929b889bb0de2b0b6ee138.tar.gz rtmux-29c29e771767b037f2929b889bb0de2b0b6ee138.tar.bz2 rtmux-29c29e771767b037f2929b889bb0de2b0b6ee138.zip |
Add a format for client PID (client_pid) and server PID (pid). Diff for
client_pid from Thomas Adam.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -271,6 +271,7 @@ format_create_status(int status) *ptr = '\0'; format_add(ft, "host_short", "%s", host); } + format_add(ft, "pid", "%ld", (long) getpid()); return (ft); } @@ -703,6 +704,7 @@ format_defaults_client(struct format_tree *ft, struct client *c) if (ft->s == NULL) ft->s = c->session; + format_add(ft, "client_pid", "%ld", (long) c->pid); format_add(ft, "client_height", "%u", c->tty.sy); format_add(ft, "client_width", "%u", c->tty.sx); if (c->tty.path != NULL) |