Changeset 25712 for trunk/pstamp/scripts/pstamp_job_run.pl
- Timestamp:
- Oct 1, 2009, 10:07:51 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_job_run.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_job_run.pl
r25369 r25712 16 16 use PS::IPP::PStamp::RequestFile qw( :standard ); 17 17 use IPC::Cmd 0.36 qw( can_run run ); 18 use POSIX; 18 19 19 20 use PS::IPP::Metadata::Config; … … 93 94 run(command => $command, verbose => $verbose); 94 95 95 if ($success) { 96 my $exitStatus; 97 if (WIFEXITED($error_code)) { 98 $exitStatus = WEXITSTATUS($error_code); 99 } else { 100 print STDERR "ppstamp failed error_code: $error_code\n"; 101 $exitStatus = $PS_EXIT_SYS_ERROR; 102 } 103 104 if ($exitStatus == 0) { 96 105 my $dir = dirname($outputBase); 97 106 … … 133 142 close F; 134 143 $jobStatus = $PS_EXIT_SUCCESS; 135 } else { 136 $jobStatus = $error_code >> 8; 137 my_die( "ppstamp failed with error code: $jobStatus", $job_id, $jobStatus); 144 } elsif ($exitStatus == $PSTAMP_NO_OVERLAP) { 145 $jobStatus = $PSTAMP_NO_OVERLAP 146 } else { 147 my_die( "ppstamp failed with error code: $exitStatus", $job_id, $exitStatus); 138 148 } 139 149 } elsif ($jobType eq "get_image") { … … 162 172 { 163 173 my $command = "$pstamptool -updatejob -job_id $job_id -state stop"; 174 $command .= " -fault $jobStatus" if $jobStatus; 164 175 $command .= " -dbname $dbname" if $dbname; 165 176 $command .= " -dbserver $dbserver" if $dbserver;
Note:
See TracChangeset
for help on using the changeset viewer.
