Ignore:
Timestamp:
Jul 24, 2017, 12:59:59 PM (8 years ago)
Author:
bird
Message:

kmk,kWorker: More aggressive handling of --nice (and --priority) on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/kSubmit.c

    r3039 r3051  
    383383                {
    384384                    char        szHandleArg[32];
    385                     const char *apszArgs[6] =
     385                    extern int process_priority; /* main.c */
     386                    char        szPriorityArg[32];
     387                    const char *apszArgs[10];
     388                    int         cArgs = 0;
     389                    apszArgs[cArgs++] = szExecutable;
     390                    apszArgs[cArgs++] = "--pipe";
     391                    _snprintf(szHandleArg, sizeof(szHandleArg), "%p", hWorkerPipe);
     392                    apszArgs[cArgs++] = szHandleArg;
     393                    if (pVarVolatile)
    386394                    {
    387                         szExecutable, "--pipe", szHandleArg,
    388                         pVarVolatile ? "--volatile" : NULL, pVarVolatile ? pVarVolatile->value : NULL,
    389                         NULL
    390                     };
    391                     _snprintf(szHandleArg, sizeof(szHandleArg), "%p", hWorkerPipe);
     395                        apszArgs[cArgs++] = "--volatile";
     396                        apszArgs[cArgs++] = pVarVolatile->value;
     397                    }
     398                    if (process_priority != 0)
     399                    {
     400                        apszArgs[cArgs++] = "--priority";
     401                        _snprintf(szPriorityArg, sizeof(szPriorityArg), "%u", process_priority);
     402                        apszArgs[cArgs++] = szPriorityArg;
     403                    }
     404                    apszArgs[cArgs] = NULL;
    392405
    393406                    /*
Note: See TracChangeset for help on using the changeset viewer.