X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fgspawn.c;h=4c45eaf74c26b2018112368be28c7f7f9c901162;hb=a689811a410623c69a257a857129f0d9e9d5d61f;hp=16d269291bdaea920d74f999458c2f204895a309;hpb=e0072d4441ff2a2382307325a20baad91b5169e9;p=platform%2Fupstream%2Fglib.git diff --git a/glib/gspawn.c b/glib/gspawn.c index 16d2692..4c45eaf 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -84,11 +84,14 @@ g_spawn_error_quark (void) * @flags: flags from #GSpawnFlags * @child_setup: function to run in the child just before exec() * @user_data: user data for @child_setup - * @child_pid: return location for child process ID, or %NULL + * @child_pid: return location for child process reference, or %NULL * @error: return location for error * * See g_spawn_async_with_pipes() for a full description; this function * simply calls the g_spawn_async_with_pipes() without any pipes. + * + * You should call g_spawn_close_pid() on the returned child process + * reference when you don't need it any more. * * * If you are writing a GTK+ application, and the program you @@ -97,6 +100,11 @@ g_spawn_error_quark (void) * the spawned program opens its windows on the right screen. * * + * Note that the returned @child_pid on Windows is a + * handle to the child process and not its identifier. Process handles + * and process identifiers are different concepts on Windows. + * + * * Return value: %TRUE on success, %FALSE if error is set **/ gboolean @@ -485,6 +493,10 @@ g_spawn_sync (const gchar *working_directory, * vector elements that need it before calling the C runtime * spawn() function. * + * The returned @child_pid on Windows is a handle to the child + * process, not its identifier. Process handles and process + * identifiers are different concepts on Windows. + * * @envp is a %NULL-terminated array of strings, where each string * has the form KEY=VALUE. This will become * the child's environment. If @envp is %NULL, the child inherits its @@ -577,7 +589,7 @@ g_spawn_sync (const gchar *working_directory, * and @standard_error will not be filled with valid values. * * If @child_pid is not %NULL and an error does not occur then the returned - * pid must be closed using g_spawn_close_pid(). + * process reference must be closed using g_spawn_close_pid(). * * * If you are writing a GTK+ application, and the program you @@ -1641,9 +1653,9 @@ g_execute (const gchar *file, /** * g_spawn_close_pid: - * @pid: The process identifier to close + * @pid: The process reference to close * - * On some platforms, notably WIN32, the #GPid type represents a resource + * On some platforms, notably Windows, the #GPid type represents a resource * which must be closed to prevent resource leaking. g_spawn_close_pid() * is provided for this purpose. It should be used on all platforms, even * though it doesn't do anything under UNIX.