about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-06-07 21:48:23 -0700
committerEric Wong <normalperson@yhbt.net>2009-06-07 21:48:43 -0700
commit47a36ae531f4355bed1723b6edf902bf8db8292a (patch)
tree395d2697d8ed17e69cc6d07c17d27a057173e47c
parent0f57ea68700d7e8afb3f9e26249889ba0a02e22f (diff)
downloadlibnodelay-47a36ae531f4355bed1723b6edf902bf8db8292a.tar.gz
sleep in test to avoid race condition
Yeah, it's janky and non-portable but so is the
entire project.
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 07e870d..7569e63 100644
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,9 @@ test: libnodelay.so
                 strace -o test-client.out \
                                 nc -q 1 127.0.0.1 $(TEST_PORT) & \
                 echo $$! > test-client.pid
-        kill `cat test-client.pid` || sleep 1
-        kill `cat test-server.pid` || sleep 1
+        sleep 1
+        kill -9 `cat test-client.pid` || sleep 1
+        kill -9 `cat test-server.pid` || sleep 1
         $(RM) test-server.pid test-client.pid
         grep setsockopt.*TCP_NODELAY test-server.out
         grep setsockopt.*TCP_NODELAY test-client.out