Report handbrake failure to client

Added check on return status of handbrake process, and reports failure
to cluster client.
Fixed a bug whereby handbrake processes were not reaped after the rip
completes
This commit is contained in:
Ben Roberts
2010-02-17 01:41:46 +00:00
parent 3ea5aa5706
commit fd0e1f4777
2 changed files with 12 additions and 1 deletions

View File

@@ -125,6 +125,16 @@ sub do_rip {
while ($line = <$child_out>) {
$log->debug($line);
}
close($child_out);
# If the rip process failed, report an error status here
waitpid($child_pid, 0);
my $child_exit_status = $? >> 8;
if (!$child_exit_status) {
$log->warning("Ripping process returned error status: $child_exit_status");
return undef;
}
$log->notice("Finished rip to $rip_filename");
return $rip_filename;