def destroy_job(client, timeout, job_id, reason=None):
    """ Destroy a running job.

    Parameters
    ----------
    client : :py:class:`.ProtocolClient`
        A connection to the server.
    timeout : float or None
        The timeout for server responses.
    job_id : int
        The job ID of interest.
    reason : str or None
        The human-readable reason for destroying the job.

    Returns
    -------
    int
        An error code, 0 for success.
    """
    client.destroy_job(job_id, reason, timeout=timeout)
