[Spice-devel] [PATCH win-agent 7/9] Quit if RegisterServiceCtrlHandler failed

Alon Levy alevy at redhat.com
Sun May 13 02:31:19 PDT 2012


On Fri, May 11, 2012 at 06:39:16PM +0200, Marc-André Lureau wrote:
> ---
>  vdservice/vdservice.cpp |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp
> index 9c057bb..9fafc7c 100644
> --- a/vdservice/vdservice.cpp
> +++ b/vdservice/vdservice.cpp
> @@ -415,10 +415,8 @@ VOID WINAPI VDService::main(DWORD argc, TCHAR* argv[])
>      s->_status_handle = RegisterServiceCtrlHandlerEx(VD_SERVICE_NAME, &VDService::control_handler,
>                                                       NULL);
>      if (!s->_status_handle) {
> -        printf("RegisterServiceCtrlHandler failed\n");
> -#ifndef DEBUG_VDSERVICE

The idea was that if you are building it for debugging purposes, it will
run in the foreground, and not as a service, no Arnon?

> +        vd_printf("RegisterServiceCtrlHandler failed\n");
>          return;
> -#endif // DEBUG_VDSERVICE
>      }
>  
>      // service is starting
> -- 
> 1.7.10.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list