def kill(pidfile, signal=SIG, succmsg="", errmsg="",
         restart_file=SERVER_RESTART, restart=False):
    """
    Send a kill signal to a process based on PID. A customized
    success/error message will be returned. If clean=True, the system
    will attempt to manually remove the pid file.

    Args:
        pidfile (str): The path of the pidfile to get the PID from.
        signal (int, optional): Signal identifier.
        succmsg (str, optional): Message to log on success.
        errmsg (str, optional): Message to log on failure.
        restart_file (str, optional): Restart file location.
        restart (bool, optional): Are we in restart mode or not.

    """
    pid = get_pid(pidfile)
    if pid:
        if os.name == 'nt':
            os.remove(pidfile)
        # set restart/norestart flag
        if restart:
            django.core.management.call_command(
                'collectstatic', interactive=False, verbosity=0)
            with open(restart_file, 'w') as f:
                f.write("reload")
        else:
            with open(restart_file, 'w') as f:
                f.write("shutdown")
        try:
            os.kill(int(pid), signal)
        except __HOLE__:
            print("Process %(pid)s cannot be stopped. "\
                  "The PID file 'server/%(pidfile)s' seems stale. "\
                  "Try removing it." % {'pid': pid, 'pidfile': pidfile})
            return
        print("Evennia:", succmsg)
        return
    print("Evennia:", errmsg)
dataset/ETHPy150Open evennia/evennia/evennia/server/evennia_launcher.py/kill