libt2n: (tomj) don't use std::auto_ptr in command_client, the pointer will get lost...
[libt2n] / test / serialize.cpp
index 85a9b58..b7f3248 100644 (file)
@@ -117,19 +117,24 @@ class test_serialize : public TestFixture
 
     CPPUNIT_TEST_SUITE_END();
 
+    pid_t child_pid;
+
     public:
 
     void setUp()
-    { }
+    {
+    }
 
     void tearDown()
-    { }
+    {
+        // make sure the server-child is dead before the next test runs
+        kill(child_pid,SIGKILL);
+        sleep(1);
+    }
 
     void ClientSerializeErr()
     {
-        pid_t pid;
-
-        switch(pid=fork())
+        switch(child_pid=fork())
         {
             case -1:
             {