shithub: aacdec

Download patch

ref: bbc7f161baf39a034cf02ae841e3ce72939e82ce
parent: 28f5666db7325758fc9aa06fef8d0b0c56aa6485
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Tue Apr 6 06:41:08 EDT 2021

plan9: waitpid()

--- a/frontend/main.c
+++ b/frontend/main.c
@@ -194,6 +194,8 @@
 void
 main(int argc, char **argv)
 {
+	int n;
+
 	ARGBEGIN{
 	default:
 		usage();
@@ -202,5 +204,9 @@
 	Binit(&stdin, 0, OREAD);
 	Binit(&stdout, 1, OWRITE);
 
-	exits(decode() == 0 ? nil : "failed");
+	n = decode();
+	Bterm(&stdout);
+	waitpid();
+
+	exits(n == 0 ? nil : "failed");
 }