From 2f813ef75d7d1cfb32d78923ae6963be7266de55 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 1 Nov 2009 23:20:37 +0000 Subject: 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 #(). --- cmd-server-info.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmd-server-info.c') 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); } -- cgit v1.2.3