mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 02:06:18 +01:00
Small improvements to g_on_error_query
We can do the [S] option even if g_prgname isn't set, now that g_on_error_stack_trace(NULL) works.
This commit is contained in:
parent
f6e71c25ed
commit
904be498c5
@ -157,20 +157,12 @@ g_on_error_query (const gchar *prg_name)
|
||||
|
||||
retry:
|
||||
|
||||
if (prg_name)
|
||||
_g_fprintf (stdout,
|
||||
"%s (pid:%u): %s%s%s: ",
|
||||
prg_name,
|
||||
(guint) getpid (),
|
||||
query1,
|
||||
query2,
|
||||
query3);
|
||||
else
|
||||
_g_fprintf (stdout,
|
||||
"(process:%u): %s%s: ",
|
||||
(guint) getpid (),
|
||||
query1,
|
||||
query3);
|
||||
_g_fprintf (stdout,
|
||||
"(process:%u): %s%s%s: ",
|
||||
(guint) getpid (),
|
||||
query1,
|
||||
query2,
|
||||
query3);
|
||||
fflush (stdout);
|
||||
|
||||
if (isatty(0) && isatty(1))
|
||||
@ -189,8 +181,7 @@ g_on_error_query (const gchar *prg_name)
|
||||
else if ((buf[0] == 'P' || buf[0] == 'p')
|
||||
&& buf[1] == '\n')
|
||||
return;
|
||||
else if (prg_name
|
||||
&& (buf[0] == 'S' || buf[0] == 's')
|
||||
else if ((buf[0] == 'S' || buf[0] == 's')
|
||||
&& buf[1] == '\n')
|
||||
{
|
||||
g_on_error_stack_trace (prg_name);
|
||||
|
Loading…
Reference in New Issue
Block a user