X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/8495cd48907a1b86af91c54d1df5388e270c1680..d5d85722f4fb0fc6ca61102b397aa51a96bddcc6:/fa-flacd diff --git a/fa-flacd b/fa-flacd index 6bae1f0..3e9e7cb 100755 --- a/fa-flacd +++ b/fa-flacd @@ -1,6 +1,7 @@ #! /usr/bin/env perl # $Id$ +# $URL$ =head1 NAME @@ -89,12 +90,16 @@ sub flac { 'cue', '--no-padding', '--best', map({ ('-T', $_) } @tags), 'wav'); - if (WIFEXITED($status) and ($status = WEXITSTATUS($status)) != 0) { - die("flac: $status"); + if (WIFEXITED($status)) { + if (($status = WEXITSTATUS($status)) != 0) { + die("flac exited with status $status"); + } } elsif (WIFSIGNALED($status)) { die("flac killed with signal ", WTERMSIG($status)); } elsif (WIFSTOPPED($status)) { die("flac stopped with signal ", WSTOPSIG($status)); + } else { + die("Major horkage on system(flac): \$? = $? \$! = $!"); } verbose("Cleaning up $dir\n"); @@ -149,11 +154,11 @@ sub deljob { verbose("$pid finished ("); if (WIFEXITED($status)) { - verbose('exited ', WEXITSTATUS($status)); + verbose('exited with status ', WEXITSTATUS($status)); } elsif (WIFSIGNALED($status)) { - verbose('signalled ', WTERMSIG($status)); + verbose('killed with signal ', WTERMSIG($status)); } elsif (WIFSTOPPED($status)) { - verbose('stopped ', WSTOPSIG($status)); + verbose('stopped with signal ', WSTOPSIG($status)); } verbose(")\n");