[PATCH v2] ntdll: Implement JobObjectBasicProcessIdList for NtQueryInformationJobObject.

Paul Gofman pgofman at codeweavers.com
Tue Jun 22 13:14:09 CDT 2021


On 6/22/21 20:00, Gabriel Ivăncescu wrote:
>  
> +static data_size_t query_job_pids( struct job *job, data_size_t count, data_size_t maxcount, process_id_t *pids )
> +{
> +    struct process *process;
> +    struct job *j;
> +
> +    LIST_FOR_EACH_ENTRY( process, &job->process_list, struct process, job_entry )
> +    {
> +        if (process->end_time) continue;
> +        if (count < maxcount) pids[count] = process->id;
> +        count++;
> +    }
> +
> +    LIST_FOR_EACH_ENTRY( j, &job->child_job_list, struct job, parent_job_entry )
> +        count = query_job_pids( j, count, maxcount, pids );
> +
> +    return count;
> +}
> +
The other job enumerations (for terminating jobs and sending
completions) do it for children first on then for parent. Do you know
that this should not be the case for job pids? I don't know if the pid
sort order is important for anything or consistent on Windows, but if
not testing the order explicitly I'd suggest to enumerate in the same
order as in the other places.



More information about the wine-devel mailing list