human
Complete this python program:
def _exitOnSignal(sigName, message):
assistant
#Here is the Python code you requested.

    """Handles a signal with sys.exit.
    Some of these signals (SIGPIPE, for example) don\t exist or are invalid on
    Windows. So, ignore errors that might arise.
    """
    import signal
    try:
        sigNumber = getattr(signal, sigName)
    except AttributeError:
        return
    def handler(sig, f):
        sys.exit(message)
    try:
        signal.signal(sigNumber, handler)
    except ValueError:
        pass