X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=test%2Fcmdgroup.cpp;h=314e28d45ead688b3f88db3667d2d65403a2d16f;hb=3b2543e7dfd705d6e624560dd5a681898c0f242c;hp=32f8c6dce63dc80fa34cebcff05f660991862e3e;hpb=fb3345ada7ea94225b78994fd50e3de693a2a3d5;p=libt2n diff --git a/test/cmdgroup.cpp b/test/cmdgroup.cpp index 32f8c6d..314e28d 100644 --- a/test/cmdgroup.cpp +++ b/test/cmdgroup.cpp @@ -167,19 +167,23 @@ class test_cmdgroup : 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 GroupOk() { - pid_t pid; - - switch(pid=fork()) + switch(child_pid=fork()) { case -1: { @@ -220,9 +224,7 @@ class test_cmdgroup : public TestFixture void WrongGroup() { - pid_t pid; - - switch(pid=fork()) + switch(child_pid=fork()) { case -1: {