class_docstr: Manages a single kernel in a subprocess on this host.
  
  This version starts kernels with Popen.
class_docstr_tok: ["Manages","a","single","kernel","in","a","subprocess","on","this","host",".","This","version","starts","kernels","with","Popen","."]
docstr: Sends a signal to the process group of the kernel (this
  usually includes the kernel and any subprocesses spawned by
  the kernel).
  
  Note that since only SIGTERM is supported on Windows, this function is
  only useful on Unix systems.
docstr_tok: ["Sends","a","signal","to","the","process","group","of","the","kernel","(","this","usually","includes","the","kernel","and","any","subprocesses","spawned","by","the","kernel",")",".","Note","that","since","only","SIGTERM","is","supported","on","Windows",",","this","function","is","only","useful","on","Unix","systems","."]
code: def signal_kernel(self, signum):
      """Sends a signal to the process group of the kernel (this
      usually includes the kernel and any subprocesses spawned by
      the kernel).
  
      Note that since only SIGTERM is supported on Windows, this function is
      only useful on Unix systems.
      """
      if self.has_kernel:
          if hasattr(os, "getpgid") and hasattr(os, "killpg"):
              try:
                  pgid = os.getpgid(self.kernel.pid)
                  os.killpg(pgid, signum)
                  return
              except OSError:
                  pass
          self.kernel.send_signal(signum)
      else:
          raise RuntimeError(
              "Cannot signal kernel. No kernel is running!"
          )
  
imports: from __future__ import absolute_import
  from contextlib import contextmanager
  import os
  import re
  import signal
  import sys
  import time
  import warnings
  import zmq
  from ipython_genutils.importstring import import_item
  from .localinterfaces import is_local_ip, local_ips
  from traitlets import Any, Float, Instance, Unicode, List, Bool, Type, DottedObjectName
  from jupyter_client import launch_kernel, kernelspec
  from .connect import ConnectionFileMixin
  from .managerabc import KernelManagerABC
label_desc: Use image node_id 29 for calling the KernelManager obj's underlying member method code with example usage: obj.signal_kernel(signum) without return types