-/* $OpenBSD: format.c,v 1.287 2021/07/08 11:14:53 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.288 2021/07/13 22:09:29 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
fj->client = ft->client;
fj->tag = ft->tag;
fj->cmd = xstrdup(cmd);
- fj->expanded = NULL;
-
- xasprintf(&fj->out, "<'%s' not ready>", fj->cmd);
RB_INSERT(format_job_tree, jobs, fj);
}
}
fj->last = t;
fj->updated = 0;
- }
+ } else if (fj->job != NULL && (t - fj->last) > 1 && fj->out == NULL)
+ xasprintf(&fj->out, "<'%s' not ready>", fj->cmd);
free(expanded);
if (ft->flags & FORMAT_STATUS)
fj->status = 1;
+ if (fj->out == NULL)
+ return (xstrdup(""));
return (format_expand1(&next, fj->out));
}