List:Commits« Previous MessageNext Message »
From:msvensson Date:October 29 2007 2:56pm
Subject:bk commit into 5.0 tree (msvensson:1.2561)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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, 2007-10-29 15:55:52+01:00, msvensson@stripped +2 -0
  Tell the safe-process which parent to use if running on cygwin

  extra/safe_process_win.cc@stripped, 2007-10-29 15:55:50+01:00, msvensson@stripped +10 -0
    Add the possibility to specify what parent pid safe_process should use

  mysql-test/lib/My/SafeProcess.pm@stripped, 2007-10-29 15:55:50+01:00, msvensson@stripped +5 -0
    Tell the safe-process which parent to use if running on cygwin

diff -Nrup a/extra/safe_process_win.cc b/extra/safe_process_win.cc
--- a/extra/safe_process_win.cc	2007-10-19 15:40:28 +02:00
+++ b/extra/safe_process_win.cc	2007-10-29 15:55:50 +01:00
@@ -178,6 +178,16 @@ int main(int argc, const char** argv )
     } else {
       if ( strcmp(arg, "--verbose") == 0 )
         verbose++;
+	  else if ( strncmp(arg, "--parent-pid", 10) == 0 )
+	  {
+	    /* Override parent_pid with a value provided by user */
+		const char* start;
+        if ((start= strstr(arg, "=")) == NULL)
+		  die("Could not find start of option value in '%s'", arg);
+		start++; /* Step past = */
+		if ((parent_pid= atoi(start)) == 0)
+		  die("Invalid value '%s' passed to --parent-id", start);
+	  }
       else
         die("Unknown option: %s", arg);
     }
diff -Nrup a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm
--- a/mysql-test/lib/My/SafeProcess.pm	2007-10-29 10:38:07 +01:00
+++ b/mysql-test/lib/My/SafeProcess.pm	2007-10-29 15:55:50 +01:00
@@ -149,8 +149,13 @@ sub new {
 
   my @safe_args;
   push(@safe_args, $safe_script) if defined $safe_script;
+
   #push(@safe_args, "--verbose") if defined $verbose and $verbose > 0;
   push(@safe_args, "--verbose"); # MASV temporary always on for safe_process
+
+  # Point the safe_process at the right parent if running on cygwin
+  push(@safe_args, "--parent-pid=".Cygwin::pid_to_winpid($$)) if IS_CYGWIN;
+
   push(@safe_args, "--");
   push(@safe_args, $path); # The program safe_process should execute
   push(@safe_args, @$$args);
Thread
bk commit into 5.0 tree (msvensson:1.2561)msvensson29 Oct