aboutsummaryrefslogtreecommitdiff
path: root/src/progman.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-10-16 14:47:37 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-10-16 14:47:37 +0300
commitfa64411b0d02955f9a187214538b424c5ea37e6e (patch)
treed36cf1c1382dc9885ff1e15405d538e73c81cf0e /src/progman.c
parentbb7928607963e43db9a5fb7cac6b76d21982b7c5 (diff)
downloadpies-fa64411b0d02955f9a187214538b424c5ea37e6e.tar.gz
pies-fa64411b0d02955f9a187214538b424c5ea37e6e.tar.bz2
Improve diagnostics output.
* configure.ac (AC_CHECK_FUNCS): Remove checks for unused functions. * gnulib.modules: Add fprintftime. Remove quote. * src/pies.c (pidfile_read): Do not print error message if 'No such process' is returned. (main): Set default quoting style to shell. * src/pies.h: Include fprintftime.h. * src/progman.c (prog_start, progman_dump_stats): Quote arguments on output. (progman_dump_stats): Use fprintftime.
Diffstat (limited to 'src/progman.c')
-rw-r--r--src/progman.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/progman.c b/src/progman.c
index cc107f7..411fc8c 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -706,10 +706,8 @@ prog_start (struct prog *prog)
int i;
logmsg_printf (LOG_DEBUG, "executing");
for (i = 0; i < prog->v.p.argc; i++)
- {
- /* FIXME: quote */
- logmsg_printf (LOG_DEBUG, " %s", prog->v.p.comp->argv[i]);
- }
+ logmsg_printf (LOG_DEBUG, " %s",
+ quotearg (prog->v.p.comp->argv[i]));
logmsg_printf (LOG_DEBUG, "\n");
}
@@ -1783,11 +1781,9 @@ progman_dump_stats (const char *filename)
}
else if (prog->v.p.status == status_sleeping)
{
- char buf[48];
time_t t = prog->v.p.timestamp + SLEEPTIME;
- strftime (buf, sizeof buf, "%c",
- localtime (&t));
- fprintf (fp, _("[disabled; scheduled for %s]"), buf);
+ fprintftime (fp, _("[disabled; scheduled for %c]"),
+ localtime (&t), 0, 0);
}
else if (prog->v.p.status == status_disabled)
fprintf (fp, _("[disabled]"));
@@ -1796,10 +1792,7 @@ progman_dump_stats (const char *filename)
else
fprintf (fp, _("[not running]"));
for (i = 0; i < prog->v.p.argc; i++)
- {
- /* FIXME: quote as appropriate */
- fprintf (fp, " %s", prog->v.p.comp->argv[i]);
- }
+ fprintf (fp, " %s", quotearg (prog->v.p.comp->argv[i]));
fputc ('\n', fp);
break;

Return to:

Send suggestions and report system problems to the System administrator.