source: trunk/package/hotplug2/patches/150-force_fork_slow.patch @ 20682

Last change on this file since 20682 was 20682, checked in by acinonyx, 7 years ago

[package] hotplug2: Always fork rules flagged as slow

File size: 741 bytes
  • workers/worker_fork.c

    a b static int worker_fork_process(void *in_ 
    396396                worker_fork_update_children(ctx); 
    397397 
    398398                child = NULL; 
    399                 for (i = 0; i < ctx->children_count; i++) { 
     399                for (i = 0; i < ctx->children_count && i < ctx->max_children; i++) { 
    400400                        if (ctx->children[i]->busy == 0) { 
    401401                                child = ctx->children[i]; 
    402402                                break; 
    static int worker_fork_process(void *in_ 
    426426                        /* 
    427427                         * We have to fork off a new child. 
    428428                         */ 
    429                         if (ctx->children_count < ctx->max_children) 
     429                        if (ctx->children_count < ctx->max_children ||  
     430                        (ruleset_flags(&ctx->settings->rules, uevent) & FLAG_SLOW)) 
    430431                                child = worker_fork_spawn(ctx); 
    431432 
    432433                        for (i = 0; i < uevent->env_vars_c; i++) { 
Note: See TracBrowser for help on using the repository browser.