From 053e40572c32d021ad8bd2922c97c5e6dcbe2c81 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Mon, 2 Nov 2009 21:38:27 +0000 Subject: Sync OpenBSD patchset 475: 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmd-server-info.c') diff --git a/cmd-server-info.c b/cmd-server-info.c index fff0b831..90c3bf60 100644 --- a/cmd-server-info.c +++ b/cmd-server-info.c @@ -1,4 +1,4 @@ -/* $Id: cmd-server-info.c,v 1.31 2009-10-28 23:12:38 tcunha Exp $ */ +/* $Id: cmd-server-info.c,v 1.32 2009-11-02 21:38:26 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -55,6 +55,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