Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a14b4c7d
Commit
a14b4c7d
authored
Feb 14, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Replace the __wine_unix_spawnvp() syscall by a Unix call.
parent
5c62fe0b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
22 deletions
+61
-22
loader.c
dlls/ntdll/loader.c
+11
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
loader.c
dlls/ntdll/unix/loader.c
+2
-1
process.c
dlls/ntdll/unix/process.c
+38
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+2
-0
unixlib.h
dlls/ntdll/unixlib.h
+7
-0
syscall.c
dlls/wow64/syscall.c
+0
-19
syscall.h
dlls/wow64/syscall.h
+0
-1
No files found.
dlls/ntdll/loader.c
View file @
a14b4c7d
...
@@ -3199,6 +3199,17 @@ NTSTATUS WINAPI __wine_unix_call( unixlib_handle_t handle, unsigned int code, vo
...
@@ -3199,6 +3199,17 @@ NTSTATUS WINAPI __wine_unix_call( unixlib_handle_t handle, unsigned int code, vo
}
}
/***********************************************************************
* __wine_unix_spawnvp
*/
NTSTATUS
WINAPI
__wine_unix_spawnvp
(
char
*
const
argv
[],
int
wait
)
{
struct
wine_spawnvp_params
params
=
{
(
char
**
)
argv
,
wait
};
return
WINE_UNIX_CALL
(
unix_wine_spawnvp
,
&
params
);
}
/******************************************************************
/******************************************************************
* LdrLoadDll (NTDLL.@)
* LdrLoadDll (NTDLL.@)
*/
*/
...
...
dlls/ntdll/ntdll.spec
View file @
a14b4c7d
...
@@ -1694,7 +1694,7 @@
...
@@ -1694,7 +1694,7 @@
# Unix interface
# Unix interface
@ stdcall __wine_unix_call(int64 long ptr)
@ stdcall __wine_unix_call(int64 long ptr)
@ stdcall
-syscall
__wine_unix_spawnvp(long ptr)
@ stdcall __wine_unix_spawnvp(long ptr)
@ stdcall __wine_ctrl_routine(ptr)
@ stdcall __wine_ctrl_routine(ptr)
@ extern -private __wine_syscall_dispatcher
@ extern -private __wine_syscall_dispatcher
@ extern -private __wine_unix_call_dispatcher
@ extern -private __wine_unix_call_dispatcher
...
...
dlls/ntdll/unix/loader.c
View file @
a14b4c7d
...
@@ -357,7 +357,6 @@ static void * const syscalls[] =
...
@@ -357,7 +357,6 @@ static void * const syscalls[] =
NtWriteFileGather
,
NtWriteFileGather
,
NtWriteVirtualMemory
,
NtWriteVirtualMemory
,
NtYieldExecution
,
NtYieldExecution
,
__wine_unix_spawnvp
,
wine_nt_to_unix_file_name
,
wine_nt_to_unix_file_name
,
wine_server_call
,
wine_server_call
,
wine_server_fd_to_handle
,
wine_server_fd_to_handle
,
...
@@ -2061,6 +2060,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
...
@@ -2061,6 +2060,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
load_so_dll
,
load_so_dll
,
unwind_builtin_dll
,
unwind_builtin_dll
,
unixcall_wine_dbg_write
,
unixcall_wine_dbg_write
,
unixcall_wine_spawnvp
,
system_time_precise
,
system_time_precise
,
};
};
...
@@ -2078,6 +2078,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
...
@@ -2078,6 +2078,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
wow64_load_so_dll
,
wow64_load_so_dll
,
wow64_unwind_builtin_dll
,
wow64_unwind_builtin_dll
,
wow64_wine_dbg_write
,
wow64_wine_dbg_write
,
wow64_wine_spawnvp
,
system_time_precise
,
system_time_precise
,
};
};
...
...
dlls/ntdll/unix/process.c
View file @
a14b4c7d
...
@@ -539,6 +539,44 @@ NTSTATUS WINAPI __wine_unix_spawnvp( char * const argv[], int wait )
...
@@ -539,6 +539,44 @@ NTSTATUS WINAPI __wine_unix_spawnvp( char * const argv[], int wait )
/***********************************************************************
/***********************************************************************
* unixcall_wine_spawnvp
*/
NTSTATUS
unixcall_wine_spawnvp
(
void
*
args
)
{
struct
wine_spawnvp_params
*
params
=
args
;
return
__wine_unix_spawnvp
(
params
->
argv
,
params
->
wait
);
}
#ifdef _WIN64
/***********************************************************************
* wow64_wine_spawnvp
*/
NTSTATUS
wow64_wine_spawnvp
(
void
*
args
)
{
struct
{
ULONG
argv
;
int
wait
;
}
const
*
params32
=
args
;
ULONG
*
argv32
=
ULongToPtr
(
params32
->
argv
);
unsigned
int
i
,
count
=
0
;
char
**
argv
;
NTSTATUS
ret
;
while
(
argv32
[
count
])
count
++
;
argv
=
malloc
(
(
count
+
1
)
*
sizeof
(
*
argv
)
);
for
(
i
=
0
;
i
<
count
;
i
++
)
argv
[
i
]
=
ULongToPtr
(
argv32
[
i
]
);
argv
[
count
]
=
NULL
;
ret
=
__wine_unix_spawnvp
(
argv
,
params32
->
wait
);
free
(
argv
);
return
ret
;
}
#endif
/***********************************************************************
* fork_and_exec
* fork_and_exec
*
*
* Fork and exec a new Unix binary, checking for errors.
* Fork and exec a new Unix binary, checking for errors.
...
...
dlls/ntdll/unix/unix_private.h
View file @
a14b4c7d
...
@@ -284,8 +284,10 @@ extern void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULO
...
@@ -284,8 +284,10 @@ extern void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULO
extern
void
set_async_direct_result
(
HANDLE
*
async_handle
,
NTSTATUS
status
,
ULONG_PTR
information
,
BOOL
mark_pending
)
DECLSPEC_HIDDEN
;
extern
void
set_async_direct_result
(
HANDLE
*
async_handle
,
NTSTATUS
status
,
ULONG_PTR
information
,
BOOL
mark_pending
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unixcall_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unixcall_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unixcall_wine_spawnvp
(
void
*
args
)
DECLSPEC_HIDDEN
;
#ifdef _WIN64
#ifdef _WIN64
extern
NTSTATUS
wow64_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wow64_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wow64_wine_spawnvp
(
void
*
args
)
DECLSPEC_HIDDEN
;
#endif
#endif
extern
void
dbg_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
dbg_init
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/unixlib.h
View file @
a14b4c7d
...
@@ -31,6 +31,12 @@ struct wine_dbg_write_params
...
@@ -31,6 +31,12 @@ struct wine_dbg_write_params
unsigned
int
len
;
unsigned
int
len
;
};
};
struct
wine_spawnvp_params
{
char
**
argv
;
int
wait
;
};
struct
load_so_dll_params
struct
load_so_dll_params
{
{
UNICODE_STRING
nt_name
;
UNICODE_STRING
nt_name
;
...
@@ -49,6 +55,7 @@ enum ntdll_unix_funcs
...
@@ -49,6 +55,7 @@ enum ntdll_unix_funcs
unix_load_so_dll
,
unix_load_so_dll
,
unix_unwind_builtin_dll
,
unix_unwind_builtin_dll
,
unix_wine_dbg_write
,
unix_wine_dbg_write
,
unix_wine_spawnvp
,
unix_system_time_precise
,
unix_system_time_precise
,
};
};
...
...
dlls/wow64/syscall.c
View file @
a14b4c7d
...
@@ -542,25 +542,6 @@ NTSTATUS WINAPI wow64_NtSetDefaultUILanguage( UINT *args )
...
@@ -542,25 +542,6 @@ NTSTATUS WINAPI wow64_NtSetDefaultUILanguage( UINT *args )
/**********************************************************************
/**********************************************************************
* wow64___wine_unix_spawnvp
*/
NTSTATUS
WINAPI
wow64___wine_unix_spawnvp
(
UINT
*
args
)
{
ULONG
*
argv32
=
get_ptr
(
&
args
);
int
wait
=
get_ulong
(
&
args
);
unsigned
int
i
,
count
=
0
;
char
**
argv
;
while
(
argv32
[
count
])
count
++
;
argv
=
Wow64AllocateTemp
(
(
count
+
1
)
*
sizeof
(
*
argv
)
);
for
(
i
=
0
;
i
<
count
;
i
++
)
argv
[
i
]
=
ULongToPtr
(
argv32
[
i
]
);
argv
[
count
]
=
NULL
;
return
__wine_unix_spawnvp
(
argv
,
wait
);
}
/**********************************************************************
* wow64_wine_server_call
* wow64_wine_server_call
*/
*/
NTSTATUS
WINAPI
wow64_wine_server_call
(
UINT
*
args
)
NTSTATUS
WINAPI
wow64_wine_server_call
(
UINT
*
args
)
...
...
dlls/wow64/syscall.h
View file @
a14b4c7d
...
@@ -257,7 +257,6 @@
...
@@ -257,7 +257,6 @@
SYSCALL_ENTRY( NtWriteFileGather ) \
SYSCALL_ENTRY( NtWriteFileGather ) \
SYSCALL_ENTRY( NtWriteVirtualMemory ) \
SYSCALL_ENTRY( NtWriteVirtualMemory ) \
SYSCALL_ENTRY( NtYieldExecution ) \
SYSCALL_ENTRY( NtYieldExecution ) \
SYSCALL_ENTRY( __wine_unix_spawnvp ) \
SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \
SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \
SYSCALL_ENTRY( wine_server_call ) \
SYSCALL_ENTRY( wine_server_call ) \
SYSCALL_ENTRY( wine_server_fd_to_handle ) \
SYSCALL_ENTRY( wine_server_fd_to_handle ) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment