List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:March 14 2008 4:31pm
Subject:bk commit into 5.0 tree (cmiller:1.2586)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of cmiller.  When cmiller does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-03-14 12:31:08-04:00, cmiller@stripped +1 -0
  Capture the error message of our process-existence test, "kill -0",
  as we expect errors and shouldn't pass them to the user.
  
  Additionally, be a bit more descriptive of what the problem is.

  support-files/mysql.server.sh@stripped, 2008-03-14 12:31:05-04:00, cmiller@stripped +7 -1
    Capture the error message of our process-existence test, "kill -0",
    as we expect errors and shouldn't pass them to the user.
    
    Additionally, be a bit more descriptive of what the problem is.

diff -Nrup a/support-files/mysql.server.sh b/support-files/mysql.server.sh
--- a/support-files/mysql.server.sh	2007-11-05 11:46:23 -05:00
+++ b/support-files/mysql.server.sh	2008-03-14 12:31:05 -04:00
@@ -155,8 +155,14 @@ wait_for_pid () {
     sleep 1
     case "$1" in
       'created')
+        # wait for a PID-file to pop into existence.
         test -s $pid_file && i='' && break
-        kill -0 $2 || break # if the program goes away, stop waiting
+
+        # though, if the server dies, it never will be created.
+        if ! kill -0 "$2" 2>/dev/null; then  # new process doesn't exist,
+          log_failure_msg "Server quit before creating the PID file"
+          return 1  # not waiting any more.
+        fi
         ;;
       'removed')
         test ! -s $pid_file && i='' && break
Thread
bk commit into 5.0 tree (cmiller:1.2586)Chad MILLER14 Mar