Skip to content
Snippets Groups Projects
Commit b2f6d15b authored by Simon McVittie's avatar Simon McVittie
Browse files

all: Include process ID in output


When we have more than one layer of adverbs, this provides a way to
tell which one we are.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 39eb6f2c
Branches
Tags
No related merge requests found
......@@ -451,13 +451,15 @@ static GOptionEntry options[] =
{ NULL }
};
static int my_pid = -1;
static void
cli_log_func (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
g_printerr ("%s: %s\n", (const char *) user_data, message);
g_printerr ("%s[%d]: %s\n", (const char *) user_data, my_pid, message);
}
int
......@@ -478,6 +480,8 @@ main (int argc,
sigset_t mask;
struct sigaction terminate_child_action = {};
my_pid = getpid ();
sigemptyset (&mask);
sigaddset (&mask, SIGCHLD);
......
......@@ -440,13 +440,15 @@ static const GOptionEntry options[] =
{ NULL }
};
static int my_pid = -1;
static void
cli_log_func (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
g_printerr ("%s: %s\n", (const char *) user_data, message);
g_printerr ("%s[%d]: %s\n", (const char *) user_data, my_pid, message);
}
int
......@@ -476,6 +478,8 @@ main (int argc,
GHashTableIter iter;
gpointer key, value;
my_pid = getpid ();
setlocale (LC_ALL, "");
g_set_prgname ("pressure-vessel-launch");
......
......@@ -1005,13 +1005,15 @@ static GOptionEntry options[] =
{ NULL }
};
static int my_pid = -1;
static void
cli_log_func (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
g_printerr ("%s: %s\n", (const char *) user_data, message);
g_printerr ("%s[%d]: %s\n", (const char *) user_data, my_pid, message);
}
int
......@@ -1027,6 +1029,8 @@ main (int argc,
gsize i;
int ret = EX_USAGE;
my_pid = getpid ();
setlocale (LC_ALL, "");
g_set_prgname ("pressure-vessel-launcher");
......
......@@ -842,13 +842,15 @@ tristate_environment (const gchar *name)
return TRISTATE_MAYBE;
}
static int my_pid = -1;
static void
cli_log_func (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
g_printerr ("%s: %s\n", (const char *) user_data, message);
g_printerr ("%s[%d]: %s\n", (const char *) user_data, my_pid, message);
}
int
......@@ -886,6 +888,8 @@ main (int argc,
"STEAM_COMPAT_TOOL_PATH",
};
my_pid = getpid ();
setlocale (LC_ALL, "");
g_set_prgname ("pressure-vessel-wrap");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment