MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:February 25 2010 8:36pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (vvaintroub:2989)
View as plain text  
#At file:///H:/bzr/mysql-next-mr-bugfixing/ based on revid:vvaintroub@stripped

 2989 Vladislav Vaintroub	2010-02-25
      #51502 [Opn]: building with cmake creates an invalid mysqld_safe.
      
      The problem was incorrect espaping used inside a strig : in \"$MYSQLD\" was written as "\MYSQL\" 
      (backslash and quote characters transposed), when defining FIND_PROC  variable for BSD or SysV
      style "ps".
      
      Additionally fixed obvious code duplication and random naming in CHECK_PID test.

    modified:
      scripts/CMakeLists.txt
=== modified file 'scripts/CMakeLists.txt'
--- a/scripts/CMakeLists.txt	2010-02-23 12:50:45 +0000
+++ b/scripts/CMakeLists.txt	2010-02-25 20:36:03 +0000
@@ -103,9 +103,9 @@ ENDIF()
 IF(NOT FIND_PROC)
   # BSD style
   EXECUTE_PROCESS(COMMAND ps -uaxww OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
-  IF(result MATCHES 0)
+  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 \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" | grep \" $PID \" > /dev/null")
   ENDIF()
 ENDIF()
 
@@ -113,20 +113,15 @@ 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 \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" | grep \" $PID \" > /dev/null")
   ENDIF()
 ENDIF()
   
-EXECUTE_PROCESS(COMMAND sh -c "kill -0 $$" OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result2)
-IF(result3 MATCHES 0)
+EXECUTE_PROCESS(COMMAND sh -c "kill -0 $$" OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
+IF(result MATCHES 0)
   SET(CHECK_PID "kill -0 $PID > /dev/null 2> /dev/null")
 ELSE()
-  EXECUTE_PROCESS(COMMAND sh -c "kill -s 0 $$" OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result3)
-  IF(result4 MATCHES 0)
-    SET(CHECK_PID "kill -s 0 $PID > /dev/null 2> /dev/null")
-  ELSE()
-    SET(CHECK_PID "kill -s SIGCONT $PID  > /dev/null 2> /dev/null")
-  ENDIF()
+  SET(CHECK_PID "kill -s SIGCONT $PID  > /dev/null 2> /dev/null")
 ENDIF()
 
 ENDIF(UNIX)


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20100225203603-141a3f9k9xjgvsjy.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (vvaintroub:2989)Vladislav Vaintroub25 Feb