Re: ntdll: Implement job objects
Andrew Cook <ariscop(a)gmail.com> wrote:
+typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT { + PVOID CompletionKey; + HANDLE CompletionPort; +} JOBOBJECT_ASSOCIATE_COMPLETION_PORT, *PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
This needs to go into its owm header.
+static DWORD getProcess(PHANDLE handle) { + STARTUPINFO startup = {}; + PROCESS_INFORMATION info = {}; + + if(!CreateProcessA(NULL, GetCommandLine(), NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info)) { + ok(FALSE, "CreateProcess: %x\n", GetLastError()); + return 0; + } + + CloseHandle(info.hThread); + *handle = info.hProcess; + + return info.dwProcessId; +};
Indentation is completely messed up in the tests, please set tab size to 8 and even better avoid tabs at all. ';' at the end of function looks funny.
+typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT { + PVOID CompletionKey; + HANDLE CompletionPort; +} JOBOBJECT_ASSOCIATE_COMPLETION_PORT, *PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
Same as above.
+static NTSTATUS (WINAPI *pNtCreateJobObject)( PHANDLE handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr ); +static NTSTATUS (WINAPI *pNtSetInformationJobObject)( HANDLE handle, JOBOBJECTINFOCLASS klass, PVOID info, ULONG len ); +static NTSTATUS (WINAPI *pNtAssignProcessToJobObject)( HANDLE job, HANDLE process ); +static NTSTATUS (WINAPI *pNtIsProcessInJob)( HANDLE process, HANDLE job ); +static NTSTATUS (WINAPI *pNtTerminateJobObject)( HANDLE job, NTSTATUS status );
Please move it to the beginning of the file.
--- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h
And don't include autogenerated stuff in the patch. -- Dmitry.
On 27/08/13 22:02, Dmitry Timoshkov wrote:
Andrew Cook <ariscop(a)gmail.com> wrote:
--- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h
And don't include autogenerated stuff in the patch.
Is there anything about this on the wiki? i wasn't sure how autogenerated files are supposed to be handled.
Andrew Cook <ariscop(a)gmail.com> wrote:
On 27/08/13 22:02, Dmitry Timoshkov wrote:
Andrew Cook <ariscop(a)gmail.com> wrote:
--- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h
And don't include autogenerated stuff in the patch.
Is there anything about this on the wiki? i wasn't sure how autogenerated files are supposed to be handled.
http://wiki.winehq.org/SubmittingPatches#head-84da92180d7e348c42aa38456e4159... "Do not include diffs for files that are automatically generated..." -- Dmitry.
participants (2)
-
Andrew Cook -
Dmitry Timoshkov