diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-11-01 23:20:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-11-01 23:20:37 +0000 |
commit | 2f813ef75d7d1cfb32d78923ae6963be7266de55 (patch) | |
tree | fed2d2ac2f0b98903eea186a19f2444a8ee99452 /cmd-server-info.c | |
parent | 32299e401039e9c88e430516e9d85d59d551b859 (diff) |
Add a flag for jobs that shouldn't be freed after they've died and use it for
status jobs, then only kill those jobs when status-left, status-right or
set-titles-string is changed.
Fixes problems with changing options from inside #().
Diffstat (limited to 'cmd-server-info.c')
-rw-r--r-- | cmd-server-info.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd-server-info.c b/cmd-server-info.c index b4cce636..4107527b 100644 --- a/cmd-server-info.c +++ b/cmd-server-info.c @@ -56,6 +56,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) struct tty_code *code; struct tty_term_code_entry *ent; struct utsname un; + struct job *job; struct grid *gd; struct grid_line *gl; u_int i, j, k; @@ -178,5 +179,11 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) } ctx->print(ctx, "%s", ""); + ctx->print(ctx, "Jobs:"); + SLIST_FOREACH(job, &all_jobs, lentry) { + ctx->print(ctx, "%s [fd=%d, pid=%d, status=%d, flags=0x%x]", + job->cmd, job->fd, job->pid, job->status, job->flags); + } + return (0); } |