code: func CleanupClients() {
  	// Set the killed to true so that we don't get unexpected panics
  	atomic.StoreUint32(&Killed, 1)
  
  	// Kill all the managed clients in parallel and use a WaitGroup
  	// to wait for them all to finish up.
  	var wg sync.WaitGroup
  	managedClientsLock.Lock()
  	for _, client := range managedClients {
  		wg.Add(1)
  
  		go func(client *Client) {
  			client.Kill()
  			wg.Done()
  		}(client)
  	}
  	managedClientsLock.Unlock()
  
  	wg.Wait()
  }
docs: // This makes sure all the managed subprocesses are killed and properly
  // logged. This should be called before the parent process running the
  // plugins exits.
  //
  // This must only be called _once_.