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

Re: [libvirt] [PATCH] daemon: Unlink unix sockets at daemon shutdown



于 2011年07月27日 18:07, Osier Yang 写道:
> ---
>  daemon/libvirtd.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index 9e044e2..61f5a2d 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -1572,6 +1572,12 @@ cleanup:
>      if (pid_file)
>          unlink (pid_file);
>  
> +    if (sock_file && sock_file[0] != '@')
> +        unlink(sock_file);
> +
> +    if (sock_file_ro && sock_file_ro[0] != '@')
> +        unlink(sock_file_ro);
> +

With this patch, the socket files could be removed successfully.

But it looks to me virNetSocketFree already unlink the socket files,
it's weired
the unix socket files still exists after daemon shutdown. So, this patch
might be
not quite right.

>      VIR_FREE(sock_file);
>      VIR_FREE(sock_file_ro);
>      VIR_FREE(pid_file);


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