mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
BUG#11878394 - MYSQLD_SAFE TEST FOR ALREADY RUNNING PROCESS
FAILS, CAUSING CLOBBERED SOCKET A check for running mysqld instances was failing in mysqld_safe because of an incorrect shell command generated by cmake. The problem is that cmake retains the '\' of escaped double-quote, so the generated mysqld_safe script's command contained \" in the shell command, and hence the failure. Fixed the command in scripts\CMakeLists.txt.
This commit is contained in:
parent
4c57188c9c
commit
e7b37d7258
1 changed files with 4 additions and 4 deletions
|
@ -104,11 +104,11 @@ IF(UNIX)
|
|||
# FIND_PROC and CHECK_PID are used by mysqld_safe
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
SET (FIND_PROC
|
||||
"ps wwwp $PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" > /dev/null")
|
||||
"ps wwwp $PID | grep -v mysqld_safe | grep -- $MYSQLD > /dev/null")
|
||||
ENDIF()
|
||||
IF(NOT FIND_PROC AND CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||
SET (FIND_PROC
|
||||
"ps -p $PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" > /dev/null")
|
||||
"ps -p $PID | grep -v mysqld_safe | grep -- $MYSQLD > /dev/null")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT FIND_PROC)
|
||||
|
@ -116,7 +116,7 @@ IF(NOT FIND_PROC)
|
|||
EXECUTE_PROCESS(COMMAND ps -uaxww OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
|
||||
IF(result MATCHES 0)
|
||||
SET( FIND_PROC
|
||||
"ps -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" | grep \" $PID \" > /dev/null")
|
||||
"ps -uaxww | grep -v mysqld_safe | grep -- $MYSQLD | grep $PID > /dev/null")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@ -124,7 +124,7 @@ IF(NOT FIND_PROC)
|
|||
# SysV style
|
||||
EXECUTE_PROCESS(COMMAND ps -ef OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
|
||||
IF(result MATCHES 0)
|
||||
SET( FIND_PROC "ps -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" | grep \" $PID \" > /dev/null")
|
||||
SET( FIND_PROC "ps -ef | grep -v mysqld_safe | grep -- $MYSQLD | grep $PID > /dev/null")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
|
Loading…
Reference in a new issue