Re: [PATCH 01/16] remote_driver: Convert virExecDaemonize usage to virCommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/10/2011 02:07 PM, Cole Robinson wrote:
> And drop the now unused virExecDaemonize
> 
> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> ---
>  src/libvirt_private.syms   |    1 -
>  src/remote/remote_driver.c |   18 ++++++-----
>  src/util/util.c            |   73 +-------------------------------------------
>  src/util/util.h            |    9 -----
>  4 files changed, 11 insertions(+), 90 deletions(-)

Cool 1:9 patch ratio.  And thanks for tackling this series!  It's been a
low-priority todo on my plate for some time, now.

> @@ -326,8 +327,8 @@ static int
>  remoteForkDaemon(void)
>  {
>      const char *daemonPath = remoteFindDaemonPath();
> -    const char *const daemonargs[] = { daemonPath, "--timeout=30", NULL };
> -    pid_t pid;
> +    virCommandPtr cmd = NULL;
> +    int ret;
>  
>      if (!daemonPath) {
>          remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
> @@ -335,13 +336,14 @@ remoteForkDaemon(void)
>          return -1;
>      }
>  
> -    if (virExecDaemonize(daemonargs, NULL, NULL,
> -                         &pid, -1, NULL, NULL,
> -                         VIR_EXEC_CLEAR_CAPS,
> -                         NULL, NULL, NULL) < 0)
> -        return -1;
> +    cmd = virCommandNewArgList(daemonPath, "--timeout", "30", NULL);

The documented preference for long options with arguments is "--a=b" as
one argv, rather than "--a" "b" as two argv, but both work, so I'm fine
with that change.

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]