From 88baae805db0b234b1fd351485ee485f2a41cd73 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 27 Nov 2004 05:24:12 +0000 Subject: [PATCH] Update the @flags documentation with references to GChildWatch and 2004-11-27 Matthias Clasen * glib/gspawn.c (g_spawn_async_with_pipes): Update the @flags documentation with references to GChildWatch and g_spawn_close_pid(). (#136255, noted by Owen Taylor) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gspawn.c | 21 +++++++++++---------- 6 files changed, 41 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6aa7214..3cae7b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-27 Matthias Clasen + + * glib/gspawn.c (g_spawn_async_with_pipes): Update the @flags + documentation with references to GChildWatch and + g_spawn_close_pid(). (#136255, noted by Owen Taylor) + 2004-11-26 Matthias Clasen * glib/gkeyfile.c (g_key_file_parse_value_as_string): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6aa7214..3cae7b4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-11-27 Matthias Clasen + + * glib/gspawn.c (g_spawn_async_with_pipes): Update the @flags + documentation with references to GChildWatch and + g_spawn_close_pid(). (#136255, noted by Owen Taylor) + 2004-11-26 Matthias Clasen * glib/gkeyfile.c (g_key_file_parse_value_as_string): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 6aa7214..3cae7b4 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2004-11-27 Matthias Clasen + + * glib/gspawn.c (g_spawn_async_with_pipes): Update the @flags + documentation with references to GChildWatch and + g_spawn_close_pid(). (#136255, noted by Owen Taylor) + 2004-11-26 Matthias Clasen * glib/gkeyfile.c (g_key_file_parse_value_as_string): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6aa7214..3cae7b4 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-11-27 Matthias Clasen + + * glib/gspawn.c (g_spawn_async_with_pipes): Update the @flags + documentation with references to GChildWatch and + g_spawn_close_pid(). (#136255, noted by Owen Taylor) + 2004-11-26 Matthias Clasen * glib/gkeyfile.c (g_key_file_parse_value_as_string): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6aa7214..3cae7b4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-11-27 Matthias Clasen + + * glib/gspawn.c (g_spawn_async_with_pipes): Update the @flags + documentation with references to GChildWatch and + g_spawn_close_pid(). (#136255, noted by Owen Taylor) + 2004-11-26 Matthias Clasen * glib/gkeyfile.c (g_key_file_parse_value_as_string): diff --git a/glib/gspawn.c b/glib/gspawn.c index 0f7b665..623b10b 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -449,7 +449,7 @@ g_spawn_sync (const gchar *working_directory, * spawn*() family of functions (which * g_spawn_async_with_pipes() eventually calls) paste the argument * vector elements into a command line, and the C runtime startup code - * does a corresponding recostruction of an argument vector from the + * does a corresponding reconstruction of an argument vector from the * command line, to be passed to main(). Complications arise when you have * argument vector elements that contain spaces of double quotes. The * spawn*() functions don't do any quoting or @@ -466,15 +466,16 @@ g_spawn_sync (const gchar *working_directory, * parent's environment. * * @flags should be the bitwise OR of any flags you want to affect the - * function's behavior. On Unix, the %G_SPAWN_DO_NOT_REAP_CHILD means - * that the child will not be automatically reaped; you must call - * waitpid() or handle %SIGCHLD yourself, or the - * child will become a zombie. On Windows, the flag means that a - * handle to the child will be returned @child_pid. You must call - * CloseHandle() on it eventually (or exit the - * process), or the child processs will continue to take up some table - * space even after its death. Quite similar to zombies on Unix, - * actually. + * function's behaviour. The %G_SPAWN_DO_NOT_REAP_CHILD means that + * the child will not automatically be reaped; you must use a + * #GChildWatch source to be notified about the death of the child + * process. Eventually you must call g_spawn_close_pid() on the + * @child_pid, in order to free resources which may be associated + * with the child process. (On Unix, using a #GChildWatch source is + * equivalent to calling waitpid() or handling the %SIGCHLD signal + * manually. On Windows, calling g_spawn_close_pid() is equivalent + * to calling CloseHandle() on the process handle returned in + * @child_pid). * * %G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that the parent's open file * descriptors will be inherited by the child; otherwise all -- 2.7.4