diff options
Diffstat (limited to 'modules/WorkspaceCreator.pm')
-rw-r--r-- | modules/WorkspaceCreator.pm | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index def94263..f41f6520 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -216,11 +216,11 @@ sub parse_line { ## lock the directory if (-e "$wdir/$lock") { - die "Error: Another instance of MPC is using $wdir, or a previous session failed to remove the lock file $lock\n"; + die "Error: Another instance of MPC is using $wdir, or a previous session failed to remove the lock file $lock\n"; } else { - open (FDL, ">$wdir/$lock") || die "Error reating lock file $lock in $wdir\n"; - print FDL "File generated by MPC process ", $$, " on ", scalar (localtime(time())), "\n"; + open (FDL, ">$wdir/$lock") || die "Error reating lock file $lock in $wdir\n"; + print FDL "File generated by MPC process ", $$, " on ", scalar (localtime(time())), "\n"; close FDL; $self->diagnostic("Multiprocess MPC created lock file $wdir/$lock"); @@ -1484,7 +1484,7 @@ sub generate_project_files { $status = 1; } else { - $status = $creator->generate($self->mpc_basename($file)); + $status = $creator->generate($self->mpc_basename($file)); ## If any one project file fails, then stop ## processing altogether. @@ -1696,11 +1696,11 @@ sub generate_project_files_fork { ## processing altogether. if (!$status) { # save the status info and exit. the parent will - # see the error. - print FD "$status|Unable to process " . - ($file eq '' ? " in $dir" : $file) . "\n"; + # see the error. + print FD "$status|Unable to process " . + ($file eq '' ? " in $dir" : $file) . "\n"; - exit(1); # child error + exit(1); # child error } ## Get the individual project information and @@ -1712,33 +1712,33 @@ sub generate_project_files_fork { } - print FD "$status|''|$self->{'cacheok'}|$previmpl|$prevcache\n"; - print FD "$ofile|$prkey|$dir|$cwd|$restore\n"; + print FD "$status|''|$self->{'cacheok'}|$previmpl|$prevcache\n"; + print FD "$ofile|$prkey|$dir|$cwd|$restore\n"; - print FD Dumper ($files_written), "\n"; - print FD Dumper ($gen_proj_info), "\n"; - print FD Dumper ($gen_lib_locs), "\n"; + print FD Dumper ($files_written), "\n"; + print FD Dumper ($gen_proj_info), "\n"; + print FD Dumper ($gen_lib_locs), "\n"; - # there's a callback that sets the project file list - # since we can't callback between processes we store - # the list for later - print FD Dumper ($self->{'project_file_list'}), "\n"; + # there's a callback that sets the project file list + # since we can't callback between processes we store + # the list for later + print FD Dumper ($self->{'project_file_list'}), "\n"; } else { ## Unable to change to the directory. ## We don't restore the state before we leave, ## but that's ok since we will be exiting soon. - print FD "$status|Unable to change directory to $dir\n"; + print FD "$status|Unable to change directory to $dir\n"; - exit (1); # child error + exit (1); # child error } } else { ## This one was excluded, so status is ok ## no need to set though since the child will exit. - #$status = 1; + #$status = 1; } exit(0); # child is finished @@ -1778,10 +1778,10 @@ sub generate_project_files_fork { eval (<FD>); my $gen_lib_locs; for my $k (sort { substr($a, 0 , index ($a, '|')) <=> - substr ($b, 0, index ($b, '|')) } keys %$VAR1) { + substr ($b, 0, index ($b, '|')) } keys %$VAR1) { $gen_lib_locs->{substr ($k, index ($k, '|') + 1)} = - $VAR1->{$k}; + $VAR1->{$k}; } # have to reconstitute project_file_list in the same order it was @@ -1789,46 +1789,46 @@ sub generate_project_files_fork { # single process. eval (<FD>); for my $k (sort { substr($a, 0 , index ($a, '|')) <=> - substr ($b, 0, index ($b, '|')) } keys %$VAR1) { + substr ($b, 0, index ($b, '|')) } keys %$VAR1) { $self->{'project_file_list'}->{substr ($k, index ($k, '|') + 1)} = - $VAR1->{$k}; + $VAR1->{$k}; } $self->{'cacheok'} = $cacheok; if ($self->cd($dir)) { if ($self->{'cacheok'} && defined $allprojects{$prkey}) { - $files_written = $allprojects{$prkey}; - $gen_proj_info = $allprinfo{$prkey}; - $gen_lib_locs = $allliblocs{$prkey}; - $status = 1; + $files_written = $allprojects{$prkey}; + $gen_proj_info = $allprinfo{$prkey}; + $gen_lib_locs = $allliblocs{$prkey}; + $status = 1; } else { - # file is already generated. check status - if (!$status) { + # file is already generated. check status + if (!$status) { - ## We don't restore the state before we leave, - ## but that's ok since we will be exiting right now. - return $status, $creator, $msg; - } + ## We don't restore the state before we leave, + ## but that's ok since we will be exiting right now. + return $status, $creator, $msg; + } - ## Get the individual project information and - ## generated file name(s) - if ($self->{'cacheok'}) { + ## Get the individual project information and + ## generated file name(s) + if ($self->{'cacheok'}) { - $allprojects{$prkey} = $files_written; - $allprinfo{$prkey} = $gen_proj_info; - $allliblocs{$prkey} = $gen_lib_locs; - } + $allprojects{$prkey} = $files_written; + $allprinfo{$prkey} = $gen_proj_info; + $allliblocs{$prkey} = $gen_lib_locs; + } - push(@{$self->{'mpc_to_output'}->{$ofile}}, @$files_written); + push(@{$self->{'mpc_to_output'}->{$ofile}}, @$files_written); } $self->cd($cwd); $self->save_project_info($files_written, $gen_proj_info, - $gen_lib_locs, $dir, - \@projects, \%pi, \%liblocs); + $gen_lib_locs, $dir, + \@projects, \%pi, \%liblocs); } else { ## Unable to change to the directory. |