From: David van Moolenbroek Date: Sun, 27 Oct 2013 18:00:54 +0000 (+0100) Subject: test56: fix race condition X-Git-Tag: v3.3.0~528 X-Git-Url: http://zhaoyanbai.com/repos/html/index.html?a=commitdiff_plain;h=56be4fa6160868f4e2a0e920945c3608c62bff6b;p=minix.git test56: fix race condition Change-Id: Ib8f435f2272fed96e99698ab5030531e733577ca --- diff --git a/test/test56.c b/test/test56.c index 6b46d9fdf..88e0c49e7 100644 --- a/test/test56.c +++ b/test/test56.c @@ -3039,6 +3039,9 @@ test_nonblock(void) close(server_sd); + /* Let the socket become writable in the parent process. */ + sleep(1); + if (write(client_sd, buf, 1) != 1) test_fail("write() should have succeeded");