    async def _signal(self, sig):
        """Send given signal to a single-user server's process.

        Returns True if the process still exists, False otherwise.

        The hub process is assumed to have enough privileges to do this (e.g. root).
        """
        try:
            os.kill(self.pid, sig)
        except ProcessLookupError:
            return False  # process is gone
        except OSError as e:
            raise  # Can be EPERM or EINVAL
        return True  # process exists
Send given signal to a single-user server's process.

Returns True if the process still exists, False otherwise.

The hub process is assumed to have enough privileges to do this (e.g. root).
jupyterhub/spawner.py