The branch, master has been updated
       via  c892217 smbtorture: Do not leak child processes when exiting
      from  3101d9b s3-libsmb: Remove dead gssapi code.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c892217a1236a5fde9072d726605e2e1b610a160
Author: Christof Schmitt <[email protected]>
Date:   Thu Dec 15 13:53:48 2011 -0700

    smbtorture: Do not leak child processes when exiting
    
    When some child processes could not be created, smbtorture would exit
    and leave the successfully started child processes running.  Add a loop
    to kill the existing child processes for this case.
    
    Signed-off-by: Jeremy Allison <[email protected]>
    
    Autobuild-User: Jeremy Allison <[email protected]>
    Autobuild-Date: Thu Feb  2 01:35:27 CET 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/util_smb.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index c9a4a0e..9efa334 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -729,6 +729,14 @@ double torture_create_procs(struct torture_context *tctx,
 
        if (synccount != torture_nprocs) {
                printf("FAILED TO START %d CLIENTS (started %d)\n", 
torture_nprocs, synccount);
+
+               /* cleanup child processes */
+               for (i = 0; i < torture_nprocs; i++) {
+                       if (child_status[i]) {
+                               kill(child_status[i], SIGTERM);
+                       }
+               }
+
                *result = false;
                return timeval_elapsed(&tv);
        }


-- 
Samba Shared Repository

Reply via email to