@@ -475,13 +475,16 @@ void xdebug_control_socket_teardown(void)
475475#elif WIN32
476476void xdebug_control_socket_setup (void )
477477{
478+ char * name = NULL ;
479+
478480 XG_BASE (control_socket_last_trigger ) = xdebug_get_nanotime ();
479481
480- XG_BASE (control_socket_path ) = xdebug_sprintf ("\\\\.\\pipe\\xdebug-ctrl." ZEND_ULONG_FMT , xdebug_get_pid ());
482+ XG_BASE (control_socket_path ) = xdebug_sprintf ("xdebug-ctrl." ZEND_ULONG_FMT , xdebug_get_pid ());
483+ name = xdebug_sprintf ("\\\\.\\pipe\\%s" , XG_BASE (control_socket_path ));
481484
482485 /* Part 1 – create Named Pipe */
483486 XG_BASE (control_socket_h ) = CreateNamedPipeA (
484- XG_BASE ( control_socket_path ) ,
487+ name ,
485488 PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE ,
486489 PIPE_TYPE_BYTE | PIPE_NOWAIT | PIPE_REJECT_REMOTE_CLIENTS ,
487490 1 ,
@@ -491,6 +494,8 @@ void xdebug_control_socket_setup(void)
491494 NULL
492495 );
493496
497+ xdfree (name );
498+
494499 if (XG_BASE (control_socket_h ) == INVALID_HANDLE_VALUE ) {
495500 errno = WSAGetLastError ();
496501 xdebug_log_ex (XLOG_CHAN_CONFIG , XLOG_WARN , "CTRL-SOCKET" , "Can't create control Named Pipe (0x%x)" , errno );
@@ -499,7 +504,7 @@ void xdebug_control_socket_setup(void)
499504 return ;
500505 }
501506
502- xdebug_log_ex (XLOG_CHAN_CONFIG , XLOG_INFO , "CTRL-OK" , "Control socket set up successfully: '%s'" , XG_BASE (control_socket_path ));
507+ xdebug_log_ex (XLOG_CHAN_CONFIG , XLOG_INFO , "CTRL-OK" , "Control socket set up successfully: '\\\\.\\pipe\\ %s'" , XG_BASE (control_socket_path ));
503508}
504509
505510void xdebug_control_socket_teardown (void )
0 commit comments