int is_kill_allowed()

in modules/fcgid/fcgid_spawn_ctl.c [227:253]


int is_kill_allowed(server_rec * main_server, fcgid_procnode * procnode)
{
    struct fcgid_stat_node *current_node;

    if (!g_stat_pool || !procnode)
        return 0;

    /* Can I find the node base on inode, device id and cmdline? */
    for (current_node = g_stat_list_header;
         current_node != NULL; current_node = current_node->next) {
        if (current_node->inode == procnode->inode
            && current_node->deviceid == procnode->deviceid
            && !strcmp(current_node->cmdline, procnode->cmdline)
            && current_node->vhost_id == procnode->vhost_id
            && current_node->uid == procnode->uid
            && current_node->gid == procnode->gid)
            break;
    }

    if (current_node) {
        /* Found the node */
        if (current_node->process_counter <= current_node->min_class_process_count)
            return 0;
    }

    return 1;
}