mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
Bug 578295 - gtester has a race condition
Deal with the race in GMainLoop by installing a do-nothing timeout.
This commit is contained in:
parent
51ad83f711
commit
01cae84e47
@ -620,12 +620,21 @@ parse_args (gint *argc_p,
|
|||||||
*argc_p = e;
|
*argc_p = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
do_nothing (gpointer data)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc,
|
main (int argc,
|
||||||
char **argv)
|
char **argv)
|
||||||
{
|
{
|
||||||
guint ui;
|
guint ui;
|
||||||
|
|
||||||
|
/* See #578295 */
|
||||||
|
g_timeout_add_seconds (5, do_nothing, NULL);
|
||||||
|
|
||||||
/* some unices need SA_RESTART for SIGCHLD to return -EAGAIN for io.
|
/* some unices need SA_RESTART for SIGCHLD to return -EAGAIN for io.
|
||||||
* we must fiddle with sigaction() *before* glib is used, otherwise
|
* we must fiddle with sigaction() *before* glib is used, otherwise
|
||||||
* we could revoke signal hanmdler setups from glib initialization code.
|
* we could revoke signal hanmdler setups from glib initialization code.
|
||||||
|
Loading…
Reference in New Issue
Block a user