def kill_members(members, sig, hosts=nodes):
    for member in sorted(members):
        try:
            if ha_tools_debug:
                print('killing %s' % member)
            proc = hosts[member]['proc']
            # Not sure if cygwin makes sense here...
            if sys.platform in ('win32', 'cygwin'):
                os.kill(proc.pid, signal.CTRL_C_EVENT)
            else:
                os.kill(proc.pid, sig)
        except __HOLE__:
            if ha_tools_debug:
                print('%s already dead?' % member)
dataset/ETHPy150Open mongodb/motor/test/high_availability/ha_tools.py/kill_members