Commit 44ef9006 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

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.
parent fed19fc4
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
......
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
......
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
......
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
......
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
......
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
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment