Skip to content

Commit

Permalink
gprocess: get rid off the stderr_present variable
Browse files Browse the repository at this point in the history
Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed Oct 6, 2024
1 parent b3285ad commit 8e81b73
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/gprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ static gint startup_result_pipe[2] = { -1, -1 };
/* pipe used to deliver initialization result to the supervisor */
static gint init_result_pipe[2] = { -1, -1 };
static GProcessKind process_kind = G_PK_STARTUP;
static gboolean stderr_present = TRUE;
#if SYSLOG_NG_ENABLE_LINUX_CAPS
static int have_capsyslog = FALSE;
static cap_value_t cap_syslog;
Expand Down Expand Up @@ -638,7 +637,7 @@ g_process_message(const gchar *fmt, ...)
va_start(ap, fmt);
g_vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (stderr_present)
if (console_is_present(FALSE))
fprintf(stderr, "%s: %s\n", process_opts.name, buf);
else
{
Expand Down Expand Up @@ -715,10 +714,9 @@ g_process_change_limits(void)
static void
g_process_detach_stdio(void)
{
if (process_opts.mode != G_PM_FOREGROUND && stderr_present)
if (process_opts.mode != G_PM_FOREGROUND)
{
console_release();
stderr_present = FALSE;
}
}

Expand Down

0 comments on commit 8e81b73

Please sign in to comment.