X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/ebce593fdc5b49818dc49f02b9aacb9a53e3ddd1..315f17e6c9128a0fe970ca30a79c6ddfb48e124b:/fa-flacd diff --git a/fa-flacd b/fa-flacd index cbcc5c6..316e5cc 100755 --- a/fa-flacd +++ b/fa-flacd @@ -63,7 +63,7 @@ sub get_tags { verbose("DATE $date from $fn\n"); } } - close(TAGS); + close(TAGS) or die("close($fn): $!"); return ($artist, $album, $date, @tags); } @@ -115,6 +115,8 @@ sub flac { rename("$artist/$album.flac-tmp", "$artist/$album.flac") or die("rename($artist/$album.flac-tmp, $artist/$album.flac): $!"); + + return 0; } sub reaper { @@ -137,8 +139,7 @@ sub newjob { } elsif ($pid == 0) { $SIG{CHLD} = 'IGNORE'; open(STDERR, ">$dir/log") or die("open(STDERR, >$dir/log): $!"); - flac($dir); - exit(0); + exit(flac($dir)); } verbose("new job $pid for $dir\n");