summaryrefslogtreecommitdiffstats
path: root/cmd-server-info.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-11-02 21:38:27 +0000
committerTiago Cunha <tcunha@gmx.com>2009-11-02 21:38:27 +0000
commit053e40572c32d021ad8bd2922c97c5e6dcbe2c81 (patch)
tree90363ff5fecbb52e5f6ee2af5a47af93765c974d /cmd-server-info.c
parent47f69075a0d9abf031585eb86bea1646a3bf32eb (diff)
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 #().
Diffstat (limited to 'cmd-server-info.c')
-rw-r--r--cmd-server-info.c9
1 files changed, 8 insertions, 1 deletions
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 <nicm@users.sourceforge.net>
@@ -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);
}