Changeset 27177

Show
Ignore:
Timestamp:
14.04.2013 22:12:10 (7 years ago)
Author:
davidb
Message:

Test for and create (if needed) the 'tmp' directory

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/dbutil/gdbmserver.pm

    r24681 r27177  
    5555{ 
    5656  my ($infodb_file_path) = @_; 
     57 
     58  my $tmp_dir = &util::filename_cat($ENV{'GSDLHOME'},'tmp'); 
     59  if (! &util::dir_exists($tmp_dir)) { 
     60      &util::mk_dir($tmp_dir,1); 
     61  } 
     62 
     63 
    5764  # 1. Check whether the server is already running by trying to locate the 
    5865  #    server 'lock' file. 
     
    6673  flock(TMPFH, LOCK_EX) or die("Error! Cannot lock file exclusively: " . $tmp_lockfile_path . "\nReason: " . $! . "\n"); 
    6774  print TMPFH localtime(); 
     75 
    6876  # - If the file doesn't exist... 
    6977  if (!-e $server_lockfile_path)