chiark / gitweb /
Complete README changes for scripts/setup. README.{mac,freebsd} are
[disorder] / server / normalize.c
index 085d4dfb126cc3ff06e9b5f61d4f2417b071a44d..28faa8168ba9d55ef95fbd1c16ceb34fce592110 100644 (file)
@@ -73,7 +73,7 @@ static void help(void) {
 
 /* display version number and terminate */
 static void version(void) {
-  xprintf("disorder-normalize version %s\n", disorder_version_string);
+  xprintf("%s", disorder_version_string);
   xfclose(stdout);
   exit(0);
 }
@@ -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;
 }