'Stops the slapd server, and waits for it to terminate'

def stop(self):

    if (self._proc is not None):
        self._log.debug('stopping    slapd')
        if hasattr(self._proc, 'terminate'):
            self._proc.terminate()
        else:
            import posix, signal
            posix.kill(self._proc.pid, signal.SIGHUP)
        self.wait()
