X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgsubprocess.c;h=999d777e4f8d07c7b2b63cf405e1a364d1b349f7;hb=25990eb2b6da94e1d03631eab8a952ef84cb9986;hp=c0f83674ebd982e8e3e518cc0e34dfbb80667757;hpb=ed017994c9396f10c87646b5fa3639e1ca1925b8;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c index c0f8367..999d777 100644 --- a/gio/gsubprocess.c +++ b/gio/gsubprocess.c @@ -649,8 +649,8 @@ g_subprocess_class_init (GSubprocessClass *class) * g_subprocess_new: (skip) * @flags: flags that define the behaviour of the subprocess * @error: (allow-none): return location for an error, or %NULL - * @argv0: first commandline argument to pass to the subprocess, - * followed by more arguments, followed by %NULL + * @argv0: first commandline argument to pass to the subprocess + * @...: more commandline arguments, followed by %NULL * * Create a new process with the given flags and varargs argument * list. By default, matching the g_spawn_async() defaults, the @@ -686,6 +686,7 @@ g_subprocess_new (GSubprocessFlags flags, while ((arg = va_arg (ap, const gchar *))) g_ptr_array_add (args, (gchar *) arg); g_ptr_array_add (args, NULL); + va_end (ap); result = g_subprocess_newv ((const gchar * const *) args->pdata, flags, error); @@ -727,8 +728,8 @@ g_subprocess_newv (const gchar * const *argv, * g_subprocess_get_identifier: * @subprocess: a #GSubprocess * - * On UNIX, returns the process ID as a decimal string. On Windows, - * returns the result of GetProcessId() also as a string. + * On UNIX, returns the process ID as a decimal string. + * On Windows, returns the result of GetProcessId() also as a string. */ const gchar * g_subprocess_get_identifier (GSubprocess *subprocess) @@ -940,6 +941,9 @@ g_subprocess_sync_complete (GAsyncResult **result) * This function does not fail in the case of the subprocess having * abnormal termination. See g_subprocess_wait_check() for that. * + * Cancelling @cancellable doesn't kill the subprocess. Call + * g_subprocess_force_exit() if it is desirable. + * * Returns: %TRUE on success, %FALSE if @cancellable was cancelled * * Since: 2.40 @@ -1420,7 +1424,7 @@ g_subprocess_communicate_made_progress (GObject *source_object, source == state->stdout_buf || source == state->stderr_buf) { - if (!g_output_stream_splice_finish ((GOutputStream*)source, result, &error)) + if (g_output_stream_splice_finish ((GOutputStream*) source, result, &error) == -1) goto out; if (source == state->stdout_buf || @@ -1768,7 +1772,7 @@ g_subprocess_communicate_utf8 (GSubprocess *subprocess, * @callback: Callback * @user_data: User data * - * Asynchronous version of g_subprocess_communicate_utf(). Complete + * Asynchronous version of g_subprocess_communicate_utf8(). Complete * invocation with g_subprocess_communicate_utf8_finish(). */ void