Patch from J. Ali Harlow

Mon Mar  1 15:39:57 2004  Owen Taylor  <otaylor@redhat.com>

       Patch from J. Ali Harlow

        * configure.in: Use void * not HANDLE for GPid on win32.

        * glib/gspawn.[ch] glib/gspawn-win32.[ch] glib/glib.def:
        Add g_spawn_close_pid().

        * glib/gspawn.[ch]: Make g_spawn functions take
        GPid * instead if int * (GPid == int on unix, will
        produce compile warnings until fixed on Win32.)

        * tests/child-test.c: Make the test a little more
        inappropriately verbose.

        * glib/gmain.c: Add some documentation warnings about
        not closing @pid while the source is active.
This commit is contained in:
Owen Taylor
2004-03-01 20:47:49 +00:00
committed by Owen Taylor
parent 6c6e41510a
commit 38cbfaeb7a
14 changed files with 182 additions and 24 deletions

View File

@@ -3634,6 +3634,11 @@ g_child_watch_source_init (void)
* and must be added to one with g_source_attach() before it will be
* executed.
*
* Note that on platforms where #GPid must be explicitely closed
* (see g_spawn_close_pid()) @pid must not be closed while the
* source is still active. Typically, you will want to call
* g_spawn_close_pid() in the callback function for the source.
*
* Return value: the newly-created child watch source
*
* Since: 2.4
@@ -3670,6 +3675,11 @@ g_child_watch_source_new (GPid pid)
* Sets a function to be called when the child indicated by @pid exits, at a
* default priority, #G_PRIORITY_DEFAULT.
*
* Note that on platforms where #GPid must be explicitely closed
* (see g_spawn_close_pid()) @pid must not be closed while the
* source is still active. Typically, you will want to call
* g_spawn_close_pid() in the callback function for the source.
*
* Return value: the id of event source.
*
* Since: 2.4
@@ -3707,6 +3717,11 @@ g_child_watch_add_full (gint priority,
* Sets a function to be called when the child indicated by @pid exits, at a
* default priority, #G_PRIORITY_DEFAULT.
*
* Note that on platforms where #GPid must be explicitely closed
* (see g_spawn_close_pid()) @pid must not be closed while the
* source is still active. Typically, you will want to call
* g_spawn_close_pid() in the callback function for the source.
*
* Return value: the id of event source.
*
* Since: 2.4