From 60432d3dc3d2e182ed80f2329f3160894643d334 Mon Sep 17 00:00:00 2001 Message-Id: <60432d3dc3d2e182ed80f2329f3160894643d334.1716573367.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 21 Dec 2007 14:55:59 +0000 Subject: [PATCH] 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. Organization: Straylight/Edgeware From: Richard Kettlewell --- server/normalize.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- [mdw]