ntdll: Set the Unix current directory also in the exec process case.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49425
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-06-22 11:44:09 +02:00
parent c468a36903
commit 6ff0bb786c
1 changed files with 4 additions and 1 deletions

View File

@ -589,7 +589,7 @@ NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTST
{
pe_image_info_t pe_info;
BOOL is_child_64bit;
int socketfd[2];
int unixdir, socketfd[2];
char **argv;
HANDLE handle;
@ -615,6 +615,8 @@ NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTST
return status;
}
unixdir = get_unix_curdir( NtCurrentTeb()->Peb->ProcessParameters );
if (socketpair( PF_UNIX, SOCK_STREAM, 0, socketfd ) == -1) return STATUS_TOO_MANY_OPENED_FILES;
#ifdef SO_PASSCRED
else
@ -637,6 +639,7 @@ NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTST
if (!status)
{
if (!(argv = build_argv( cmdline, 2 ))) return STATUS_NO_MEMORY;
fchdir( unixdir );
do
{
status = exec_wineloader( argv, socketfd[0], is_child_64bit,