aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-12-16 00:04:29 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-12-16 00:04:29 +0200
commite66b9314c918ffcc495cb30ab22abfc9ad71d7d5 (patch)
tree22a85a54e19a6f2791e8d6b5c4566810a7766cfd
parent48e3e7d108541fc2612bab8081d4871398429cc3 (diff)
downloadpies-e66b9314c918ffcc495cb30ab22abfc9ad71d7d5.tar.gz
pies-e66b9314c918ffcc495cb30ab22abfc9ad71d7d5.tar.bz2
Bugfixes.
* src/diag.c (vlogmsg): Copy va_list before printing it to stderr. * src/progman.c (print_status): First arg is const.
-rw-r--r--src/diag.c6
-rw-r--r--src/progman.c9
2 files changed, 7 insertions, 8 deletions
diff --git a/src/diag.c b/src/diag.c
index 0aebb7a..03a9c97 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -47,10 +47,14 @@ vlogmsg (int prio, const char *fmt, va_list ap)
{
if (DIAG_OUTPUT (DIAG_TO_STDERR))
{
+ va_list aq;
fprintf (stderr, "%s: ", program_name);
- vfprintf (stderr, fmt, ap);
+ va_copy (aq, ap);
+ vfprintf (stderr, fmt, aq);
+ va_end (aq);
fprintf (stderr, "\n");
}
+
if (DIAG_OUTPUT (DIAG_TO_SYSLOG))
syslog_printer (prio, fmt, ap);
}
diff --git a/src/progman.c b/src/progman.c
index ffaf37b..9143b99 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -1708,7 +1708,7 @@ progman_stop ()
}
static void
-print_status (char *tag, pid_t pid, int status, int expect_term)
+print_status (const char *tag, pid_t pid, int status, int expect_term)
{
if (WIFEXITED (status))
{
@@ -2053,7 +2053,7 @@ run_command (struct action *act, struct prog *prog, unsigned retcode,
/* Master */
debug (1, (_("started command: %s, pid=%lu"),
act->command, (unsigned long) pid));
- register_command (_("[action]"), xstrdup (act->command), pid);
+ register_command ((char*) _("[action]"), xstrdup (act->command), pid);
}
static void
@@ -2130,11 +2130,6 @@ progman_cleanup (int expect_term)
if (!prog)
{
print_status (_("subprocess"), pid, status, expect_term);
- /*
- logmsg (LOG_NOTICE,
- _("subprocess %lu finished"),
- (unsigned long) pid);
- */
continue;
}
prog->pid = 0;

Return to:

Send suggestions and report system problems to the System administrator.