From: Serge Hallyn Date: Fri, 3 Apr 2015 23:40:49 +0000 (+0000) Subject: lxc-test-apparmor: flush the pipe before exiting child X-Git-Tag: lxc-1.1.2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43018c9088a9e9127c2297e69f88d35b0238b23c;p=thirdparty%2Flxc.git lxc-test-apparmor: flush the pipe before exiting child to make sure the parent's read returns. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/src/tests/aa.c b/src/tests/aa.c index b8689ac3f..1ab199723 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; }