title: OSError when setting SIGKILL handler in mac os and python
body: <p>Hello I am trying to set up a SIGKILL handling signal with python's <code>signal</code> module, but getting an OSError exception.</p>
  <p>Python: 3.7.5</p>
  <p>OS: MacOS Mojave</p>
  <pre class="lang-py prettyprint-override"><code>class MyClass:
      def __init__(self, *args, **kwargs):
          signal.signal(signal.SIGKILL, self.gracefull_shutdown)
          signal.signal(signal.SIGTERM, self.gracefull_shutdown)
  
  
      def gracefull_shutdown(self, signum, frame):
          # gracefull_shutdown code here
  
  </code></pre>
  <p>which gives me the following</p>
  <pre class="lang-sh prettyprint-override"><code>signal.signal(signal.SIGKILL, self.gracefull_shutdown)
    File &quot;/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/signal.py&quot;, line 47, in signal
      handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
  OSError: [Errno 22] Invalid argument
  </code></pre>
  <p>SIGTERM handling works, (by commenting out the <code>SIGKILL</code> handler). I read that MacOS supports SIGKILL, isn't that right?</p>