X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=test%2Fcmdgroup.cpp;h=314e28d45ead688b3f88db3667d2d65403a2d16f;hp=32f8c6dce63dc80fa34cebcff05f660991862e3e;hb=393e7b700efffc748e593661b365ead414a341c1;hpb=fb3345ada7ea94225b78994fd50e3de693a2a3d5 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: {