summaryrefslogtreecommitdiffstats
path: root/cmd-server-info.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-02-15 15:20:03 +0000
committerTiago Cunha <tcunha@gmx.com>2011-02-15 15:20:03 +0000
commit3d7b8105e1385c835cf0660797fe70198097e73d (patch)
tree2e5cade8fbdbc0ce2ac112b1800224710f197af1 /cmd-server-info.c
parent3b56ebce6dd4077f6527843cfc1da63614605875 (diff)
Sync OpenBSD patchset 855:
Simplify the way jobs work and drop the persist type, so all jobs are fire-and-forget. Status jobs now managed with two trees of output (new and old), rather than storing the output in the jobs themselves. When the status line is processed any jobs which don't appear in the new tree are started and the output from the old tree displayed. When a job finishes it updates the new tree with its output and that is used for any subsequent redraws. When the status interval expires, the new tree is moved to the old so that all jobs are run again. This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands of identical persistent jobs and high memory use (this can still be achieved by adding "sleep 30" but that is much less likely to happen by accident).
Diffstat (limited to 'cmd-server-info.c')
-rw-r--r--cmd-server-info.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-server-info.c b/cmd-server-info.c
index 58a8de90..f09ba989 100644
--- a/cmd-server-info.c
+++ b/cmd-server-info.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-server-info.c,v 1.43 2011-02-15 15:12:28 tcunha Exp $ */
+/* $Id: cmd-server-info.c,v 1.44 2011-02-15 15:20:03 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -175,8 +175,8 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
ctx->print(ctx, "Jobs:");
LIST_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);
+ ctx->print(ctx, "%s [fd=%d, pid=%d, status=%d]",
+ job->cmd, job->fd, job->pid, job->status);
}
return (0);