def kill_children(self, parent_pid, sig=signal.SIGINT):
        ps_command = subprocess.Popen(
            "ps -o pid --ppid %d --noheaders" % parent_pid,
            shell=True,
            stdout=subprocess.PIPE)
        ps_output = ps_command.stdout.read()
        for pid_str in ps_output.split("\n")[:-1]:
            self.kill_children(int(pid_str), sig)
            try:
                os.kill(int(pid_str), sig)
            except:
                logging.warning("Unable to kill the processus: '%s'", pid_str)
dataset/ETHPy150Open owtf/owtf/framework/core.py/Core.kill_children/original