From: "Denis V. Lunev" <den@openvz.org>
To: Yuriy Pudgorodskiy <yur@virtuozzo.com>
Cc: qemu-devel@nongnu.org, Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] create ga_run_program() helper for guest-set-user-password
Date: Tue, 12 Jan 2016 09:33:31 +0300 [thread overview]
Message-ID: <56949E3B.4030706@openvz.org> (raw)
In-Reply-To: <56939B4F.8050407@virtuozzo.com>
On 01/11/2016 03:08 PM, Yuriy Pudgorodskiy wrote:
> On 1/6/2016 4:50 PM, Denis V. Lunev wrote:
>> hmmm....
>>
>> Yur,
>>
>> it seems that you have re-invented the wheel with
>>
>> gboolean
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gboolean>
>> g_spawn_sync (/|const gchar
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gchar>
>> *working_directory|/,
>> /|gchar
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gchar>
>> **argv|/,
>> /|gchar
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gchar>
>> **envp|/,
>> /|GSpawnFlags
>> <https://developer.gnome.org/glib/stable/glib-Spawning-Processes.html#GSpawnFlags>
>> flags|/,
>> /|GSpawnChildSetupFunc
>> <https://developer.gnome.org/glib/stable/glib-Spawning-Processes.html#GSpawnChildSetupFunc>
>> child_setup|/,
>> /|gpointer
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gpointer>
>> user_data|/,
>> /|gchar
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gchar>
>> **standard_output|/,
>> /|gchar
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gchar>
>> **standard_error|/,
>> /|gint
>> <https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gint>
>> *exit_status|/,
>> /|GError
>> <https://developer.gnome.org/glib/stable/glib-Error-Reporting.html#GError>
>> **error|/);
>>
>>
>
> Not exactly.
>
> g_spawn_sync() wrapper cannot be used directly instead of my wrapper,
> because it does not support redirected stdin which is required to send
> data to chpasswd.
> g_spawn_async_with_pipes() can be used (with stdin), but it will not
> make code simpler.
>
> Most of command-posix.c calls fork/execv directly, and so does the
> wrapper I wrote.
>
>
this seems that you are right :)
Then nothing needs to be changed and patches are OK.
Den
next prev parent reply other threads:[~2016-01-12 6:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 12:01 [Qemu-devel] [PATCH v2 0/2] qga: guest-set-user-password - added ability to create new user Denis V. Lunev
2016-01-06 12:01 ` [Qemu-devel] [PATCH 1/2] create ga_run_program() helper for guest-set-user-password Denis V. Lunev
2016-01-06 13:50 ` Denis V. Lunev
2016-01-11 12:08 ` Yuriy Pudgorodskiy
2016-01-12 6:33 ` Denis V. Lunev [this message]
2016-01-06 12:01 ` [Qemu-devel] [PATCH 2/2] guest-set-user-password - added ability to create new user Denis V. Lunev
2016-01-14 7:25 ` [Qemu-devel] [PATCH v2 0/2] qga: " Denis V. Lunev
2016-01-14 14:18 ` Marc-André Lureau
2016-01-14 14:22 ` Denis V. Lunev
2016-01-14 14:46 ` Daniel P. Berrange
2016-01-20 11:30 ` Yuriy Pudgorodskiy
2016-02-09 23:22 ` Michael Roth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56949E3B.4030706@openvz.org \
--to=den@openvz.org \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=yur@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.