msvcrt: Do not acquire fd lock in msvcrt_create_io_inherit_block.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51647
Signed-off-by: Doug Lyons <douglyons@douglyons.com>
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5a514d3f45
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
b45ad23033
commit
5be7fa7879
|
@ -519,7 +519,7 @@ static int msvcrt_init_fp(FILE* file, int fd, unsigned stream_flags)
|
|||
* 04 char file flags (wxflag): repeated for each fd
|
||||
* 4+NBFD HANDLE file handle: repeated for each fd
|
||||
*/
|
||||
unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
|
||||
BOOL msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
|
||||
{
|
||||
int fd, last_fd;
|
||||
char* wxflag_ptr;
|
||||
|
@ -545,7 +545,7 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
|
|||
for (fd = 0; fd < last_fd; fd++)
|
||||
{
|
||||
/* to be inherited, we need it to be open, and that DONTINHERIT isn't set */
|
||||
fdinfo = get_ioinfo(fd);
|
||||
fdinfo = get_ioinfo_nolock(fd);
|
||||
if ((fdinfo->wxflag & (WX_OPEN | WX_DONTINHERIT)) == WX_OPEN)
|
||||
{
|
||||
*wxflag_ptr = fdinfo->wxflag;
|
||||
|
@ -556,7 +556,6 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
|
|||
*wxflag_ptr = 0;
|
||||
*handle_ptr = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
release_ioinfo(fdinfo);
|
||||
wxflag_ptr++; handle_ptr++;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -247,7 +247,7 @@ extern void msvcrt_free_scheduler(void) DECLSPEC_HIDDEN;
|
|||
extern void msvcrt_free_scheduler_thread(void) DECLSPEC_HIDDEN;
|
||||
#endif
|
||||
|
||||
extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
|
||||
extern BOOL msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
|
||||
|
||||
/* run-time error codes */
|
||||
#define _RT_STACK 0
|
||||
|
|
Loading…
Reference in New Issue