Diff for /loncom/debugging_tools/db_copy.pl between versions 1.7 and 1.8

version 1.7, 2007/06/01 19:00:05 version 1.8, 2012/02/22 17:06:42
Line 18  if (!-x $dump_db || !-x $create_db) { Line 18  if (!-x $dump_db || !-x $create_db) {
 }  }
   
   
 my $return_code = system("$create_db >& /dev/null");  my $return_code = system("/bin/bash -c '$create_db >& /dev/null'");
 # create_db exits on 1 if no filename to create was specified and is thus  # create_db exits on 1 if no filename to create was specified and is thus
 # a successful start and stop of the program  # a successful start and stop of the program
 if ($return_code == -1  if ($return_code == -1
     || (($return_code >> 8) != 1)) {      || (($return_code >> 8) != 1)) {
     $create_db = '/home/httpd/perl/debug/create_db_dynamic_64_so.3';      $create_db = '/home/httpd/perl/debug/create_db_dynamic_64_so.3';
     printf("booM %d %d!\n",$return_code,($return_code >> 8 ));      printf("booM %d %d!\n",$return_code,($return_code >> 8 ));
     $return_code = system("$create_db >& /dev/null");      $return_code = system("/bin/bash -c '$create_db >& /dev/null'");
     if ($return_code == -1      if ($return_code == -1
  || (($return_code >> 8) != 1)) {   || (($return_code >> 8) != 1)) {
  printf("booM2 %d %d!\n",$return_code,($return_code >> 8 ));   printf("booM2 %d %d!\n",$return_code,($return_code >> 8 ));
Line 71  sub process_db { Line 71  sub process_db {
  my $file = $_;   my $file = $_;
  my $dbref =&lock_db($file);   my $dbref =&lock_db($file);
  #print("attempting $file\n");   #print("attempting $file\n");
  system("$dump_db -f $file|$create_db -f $file.new");   system("/bin/bash -c '$dump_db -f $file|$create_db -f $file.new'");
 #    print("finishing $dbref\n");  #    print("finishing $dbref\n");
  rename($file,"$file.old");   rename($file,"$file.old");
  rename("$file.new","$file");   rename("$file.new","$file");

Removed from v.1.7  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>