ntdll: Return the session id in NtQuerySystemInformation(SystemProcessInformation).

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-07-01 16:15:26 +02:00
parent bf4105b731
commit b20cbd0d57
5 changed files with 7 additions and 5 deletions

View File

@ -2294,6 +2294,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
nt_process->dwBasePriority = server_process->priority;
nt_process->UniqueProcessId = UlongToHandle(server_process->pid);
nt_process->ParentProcessId = UlongToHandle(server_process->parent_pid);
nt_process->SessionId = server_process->session_id;
nt_process->HandleCount = server_process->handle_count;
get_thread_times( server_process->unix_pid, -1, &nt_process->KernelTime, &nt_process->UserTime );
fill_vm_counters( &nt_process->vmCounters, server_process->unix_pid );

View File

@ -2010,9 +2010,9 @@ struct process_info
int priority;
process_id_t pid;
process_id_t parent_pid;
unsigned int session_id;
int handle_count;
int unix_pid;
int __pad;
};
@ -6252,7 +6252,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 722
#define SERVER_PROTOCOL_VERSION 723
/* ### protocol_version end ### */

View File

@ -1874,6 +1874,7 @@ DECL_HANDLER(list_processes)
process_info->priority = process->priority;
process_info->pid = process->id;
process_info->parent_pid = process->parent_id;
process_info->session_id = process->session_id;
process_info->handle_count = get_handle_table_count(process);
process_info->unix_pid = process->unix_pid;
pos += sizeof(*process_info);

View File

@ -1609,9 +1609,9 @@ struct process_info
int priority;
process_id_t pid;
process_id_t parent_pid;
unsigned int session_id;
int handle_count;
int unix_pid;
int __pad;
/* VARARG(name,unicode_str,name_len); */
/* VARARG(threads,struct thread_info,thread_count); */
};

View File

@ -1220,9 +1220,9 @@ static void dump_varargs_process_info( const char *prefix, data_size_t size )
if (size - pos < sizeof(*process)) break;
if (pos) fputc( ',', stderr );
dump_timeout( "{start_time=", &process->start_time );
fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,session_id=%08x,handle_count=%u,unix_pid=%d,",
process->thread_count, process->priority, process->pid,
process->parent_pid, process->handle_count, process->unix_pid );
process->parent_pid, process->session_id, process->handle_count, process->unix_pid );
pos += sizeof(*process);
pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );