Check that a process is running.

    Arguments:

        pid (int): Process ID to check.

    Returns:

        True if the process is running, else false.

def isprocess(pid, error=False):
    """
    Check that a process is running.

    Arguments:

        pid (int): Process ID to check.

    Returns:

        True if the process is running, else false.
    """
    try:
        # Don't worry folks, no processes are harmed in the making of
        # this system call:
        os.kill(pid, 0)
        return True
    except OSError:
        return False