[lxc-devel] [PATCH] lxc-test-apparmor: flush the pipe before exiting child

Serge Hallyn serge.hallyn at ubuntu.com
Fri Apr 3 23:40:49 UTC 2015


to make sure the parent's read returns.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 src/tests/aa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/aa.c b/src/tests/aa.c
index b8689ac..1ab1997 100644
--- a/src/tests/aa.c
+++ b/src/tests/aa.c
@@ -47,9 +47,11 @@ static int test_attach_write_file(void* payload)
 	if (f) {
 		printf("yes\n");
 		fclose(f);
+		fflush(NULL);
 		return 1;
 	}
 	printf("no\n");
+	fflush(NULL);
 	return 0;
 }
 
-- 
2.1.4



More information about the lxc-devel mailing list