You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against upstream changes.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 43d5b2c8aa48574bfdbbb3f76c6ad670f7627571 Mon Sep 17 00:00:00 2001
|
||||
From 6a8d343ee865ec6aab96d5325f4cb374a5049cdf Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sat, 3 Jan 2015 23:37:42 -0700
|
||||
Subject: kernel32: Invalid console handles for new processes are 0, not
|
||||
@@ -78,7 +78,7 @@ index 57b6a1f..99bf706 100644
|
||||
RtlReleasePebLock();
|
||||
}
|
||||
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
|
||||
index d7d3148..787ebfa 100644
|
||||
index fd3ce7f..5ab8fa2 100644
|
||||
--- a/dlls/kernel32/tests/process.c
|
||||
+++ b/dlls/kernel32/tests/process.c
|
||||
@@ -57,7 +57,7 @@
|
||||
@@ -95,10 +95,10 @@ index d7d3148..787ebfa 100644
|
||||
static BOOL (WINAPI *pQueryFullProcessImageNameW)(HANDLE hProcess, DWORD dwFlags, LPWSTR lpExeName, PDWORD lpdwSize);
|
||||
static DWORD (WINAPI *pK32GetProcessImageFileNameA)(HANDLE,LPSTR,DWORD);
|
||||
+static struct _TEB * (WINAPI *pNtCurrentTeb)(void);
|
||||
|
||||
/* ############################### */
|
||||
static char base[MAX_PATH];
|
||||
@@ -201,6 +202,8 @@ static BOOL init(void)
|
||||
static HANDLE (WINAPI *pCreateJobObjectW)(LPSECURITY_ATTRIBUTES sa, LPCWSTR name);
|
||||
static BOOL (WINAPI *pAssignProcessToJobObject)(HANDLE job, HANDLE process);
|
||||
static BOOL (WINAPI *pIsProcessInJob)(HANDLE process, HANDLE job, PBOOL result);
|
||||
@@ -208,6 +209,8 @@ static BOOL init(void)
|
||||
if ((p = strrchr(exename, '/')) != NULL) exename = p + 1;
|
||||
|
||||
hkernel32 = GetModuleHandleA("kernel32");
|
||||
@@ -107,15 +107,15 @@ index d7d3148..787ebfa 100644
|
||||
pGetNativeSystemInfo = (void *) GetProcAddress(hkernel32, "GetNativeSystemInfo");
|
||||
pGetSystemRegistryQuota = (void *) GetProcAddress(hkernel32, "GetSystemRegistryQuota");
|
||||
pIsWow64Process = (void *) GetProcAddress(hkernel32, "IsWow64Process");
|
||||
@@ -209,6 +212,7 @@ static BOOL init(void)
|
||||
@@ -216,6 +219,7 @@ static BOOL init(void)
|
||||
pQueryFullProcessImageNameA = (void *) GetProcAddress(hkernel32, "QueryFullProcessImageNameA");
|
||||
pQueryFullProcessImageNameW = (void *) GetProcAddress(hkernel32, "QueryFullProcessImageNameW");
|
||||
pK32GetProcessImageFileNameA = (void *) GetProcAddress(hkernel32, "K32GetProcessImageFileNameA");
|
||||
+ pNtCurrentTeb = (void *)GetProcAddress( hntdll, "NtCurrentTeb" );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -277,6 +281,16 @@ static void doChild(const char* file, const char* option)
|
||||
+ pNtCurrentTeb = (void *)GetProcAddress(hntdll, "NtCurrentTeb");
|
||||
pCreateJobObjectW = (void *)GetProcAddress(hkernel32, "CreateJobObjectW");
|
||||
pAssignProcessToJobObject = (void *)GetProcAddress(hkernel32, "AssignProcessToJobObject");
|
||||
pIsProcessInJob = (void *)GetProcAddress(hkernel32, "IsProcessInJob");
|
||||
@@ -291,6 +295,16 @@ static void doChild(const char* file, const char* option)
|
||||
siA.dwFlags, siA.wShowWindow,
|
||||
(DWORD_PTR)siA.hStdInput, (DWORD_PTR)siA.hStdOutput, (DWORD_PTR)siA.hStdError);
|
||||
|
||||
@@ -132,8 +132,8 @@ index d7d3148..787ebfa 100644
|
||||
/* since GetStartupInfoW is only implemented in win2k,
|
||||
* zero out before calling so we can notice the difference
|
||||
*/
|
||||
@@ -2119,6 +2133,43 @@ static void test_DuplicateHandle(void)
|
||||
CloseHandle(out);
|
||||
@@ -2548,6 +2562,43 @@ static void test_BreakawayOk(HANDLE job)
|
||||
ok(ret, "SetInformationJobObject error %u\n", GetLastError());
|
||||
}
|
||||
|
||||
+void test_StartupNoConsole(void)
|
||||
@@ -155,7 +155,7 @@ index d7d3148..787ebfa 100644
|
||||
+ startup.dwFlags = STARTF_USESHOWWINDOW;
|
||||
+ startup.wShowWindow = SW_SHOWNORMAL;
|
||||
+ get_file_name(resfile);
|
||||
+ sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile);
|
||||
+ sprintf(buffer, "\"%s\" tests/process.c dump \"%s\"", selfname, resfile);
|
||||
+ ok(CreateProcessA(NULL, buffer, NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, &startup,
|
||||
+ &info), "CreateProcess\n");
|
||||
+ ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
@@ -175,8 +175,8 @@ index d7d3148..787ebfa 100644
|
||||
+
|
||||
START_TEST(process)
|
||||
{
|
||||
BOOL b = init();
|
||||
@@ -2149,6 +2200,7 @@ START_TEST(process)
|
||||
HANDLE job;
|
||||
@@ -2596,6 +2647,7 @@ START_TEST(process)
|
||||
test_SystemInfo();
|
||||
test_RegistryQuota();
|
||||
test_DuplicateHandle();
|
||||
@@ -185,5 +185,5 @@ index d7d3148..787ebfa 100644
|
||||
* lookup: check the way program to be executed is searched
|
||||
* handles: check the handle inheritance stuff (+sec options)
|
||||
--
|
||||
1.9.1
|
||||
2.3.3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user