mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Don't call waitpid() on a source that has already exited.
Mon Mar 1 15:49:09 2004 Owen Taylor <otaylor@redhat.com> * glib/gmain.c (check_for_child_exited): Don't call waitpid() on a source that has already exited. * glib/gmain.c (g_child_watch_check): Return TRUE only if the child actually exited.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
Mon Mar 1 15:49:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (check_for_child_exited): Don't
|
||||
call waitpid() on a source that has already exited.
|
||||
|
||||
* glib/gmain.c (g_child_watch_check): Return TRUE
|
||||
only if the child actually exited.
|
||||
|
||||
Mon Mar 1 15:39:57 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Patch from J. Ali Harlow
|
||||
|
@@ -1,3 +1,11 @@
|
||||
Mon Mar 1 15:49:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (check_for_child_exited): Don't
|
||||
call waitpid() on a source that has already exited.
|
||||
|
||||
* glib/gmain.c (g_child_watch_check): Return TRUE
|
||||
only if the child actually exited.
|
||||
|
||||
Mon Mar 1 15:39:57 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Patch from J. Ali Harlow
|
||||
|
@@ -1,3 +1,11 @@
|
||||
Mon Mar 1 15:49:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (check_for_child_exited): Don't
|
||||
call waitpid() on a source that has already exited.
|
||||
|
||||
* glib/gmain.c (g_child_watch_check): Return TRUE
|
||||
only if the child actually exited.
|
||||
|
||||
Mon Mar 1 15:39:57 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Patch from J. Ali Harlow
|
||||
|
@@ -1,3 +1,11 @@
|
||||
Mon Mar 1 15:49:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (check_for_child_exited): Don't
|
||||
call waitpid() on a source that has already exited.
|
||||
|
||||
* glib/gmain.c (g_child_watch_check): Return TRUE
|
||||
only if the child actually exited.
|
||||
|
||||
Mon Mar 1 15:39:57 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Patch from J. Ali Harlow
|
||||
|
@@ -1,3 +1,11 @@
|
||||
Mon Mar 1 15:49:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (check_for_child_exited): Don't
|
||||
call waitpid() on a source that has already exited.
|
||||
|
||||
* glib/gmain.c (g_child_watch_check): Return TRUE
|
||||
only if the child actually exited.
|
||||
|
||||
Mon Mar 1 15:39:57 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Patch from J. Ali Harlow
|
||||
|
@@ -1,3 +1,11 @@
|
||||
Mon Mar 1 15:49:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/gmain.c (check_for_child_exited): Don't
|
||||
call waitpid() on a source that has already exited.
|
||||
|
||||
* glib/gmain.c (g_child_watch_check): Return TRUE
|
||||
only if the child actually exited.
|
||||
|
||||
Mon Mar 1 15:39:57 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Patch from J. Ali Harlow
|
||||
|
13
glib/gmain.c
13
glib/gmain.c
@@ -3441,7 +3441,7 @@ g_child_watch_check (GSource *source)
|
||||
|
||||
#else /* G_OS_WIN32 */
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
check_for_child_exited (GSource *source)
|
||||
{
|
||||
GChildWatchSource *child_watch_source;
|
||||
@@ -3452,6 +3452,9 @@ check_for_child_exited (GSource *source)
|
||||
|
||||
child_watch_source = (GChildWatchSource *) source;
|
||||
|
||||
if (child_watch_source->child_exited)
|
||||
return TRUE;
|
||||
|
||||
if (child_watch_source->count < count)
|
||||
{
|
||||
gint child_status;
|
||||
@@ -3463,6 +3466,8 @@ check_for_child_exited (GSource *source)
|
||||
}
|
||||
child_watch_source->count = count;
|
||||
}
|
||||
|
||||
return child_watch_source->child_exited;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -3474,9 +3479,7 @@ g_child_watch_prepare (GSource *source,
|
||||
|
||||
child_watch_source = (GChildWatchSource *) source;
|
||||
|
||||
check_for_child_exited (source);
|
||||
|
||||
return child_watch_source->child_exited;
|
||||
return check_for_child_exited (source);
|
||||
}
|
||||
|
||||
|
||||
@@ -3487,7 +3490,7 @@ g_child_watch_check (GSource *source)
|
||||
|
||||
child_watch_source = (GChildWatchSource *) source;
|
||||
|
||||
return (child_watch_source->count < child_watch_count);
|
||||
return check_for_child_exited (source);
|
||||
}
|
||||
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
Reference in New Issue
Block a user