From: Richard Kettlewell Date: Fri, 21 Dec 2007 14:55:59 +0000 (+0000) Subject: disorder-normalize should wait for sox to finish. I think this is X-Git-Tag: 3.0~191 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/60432d3dc3d2e182ed80f2329f3160894643d334 disorder-normalize should wait for sox to finish. I think this is mostly a test-time issue: disorder-speaker doesn't care about program termination, just whether it gets the audio data. --- diff --git a/server/normalize.c b/server/normalize.c index 87b0f3d..28faa81 100644 --- a/server/normalize.c +++ b/server/normalize.c @@ -249,6 +249,13 @@ int main(int argc, char attribute((unused)) **argv) { } if(outfd != -1) xclose(outfd); + if(pid != -1) { + /* There's still a converter running */ + if(waitpid(pid, &n, 0) < 0) + fatal(errno, "error calling waitpid"); + if(n) + fatal(0, "sox failed: %#x", n); + } return 0; }