msvcrt: Fix clearing NOINHERIT flag in _dup2.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2021-10-25 18:28:39 +02:00 committed by Alexandre Julliard
parent 42d0d8d907
commit 1420d28cd6
1 changed files with 1 additions and 1 deletions

View File

@ -1128,7 +1128,7 @@ int CDECL _dup2(int od, int nd)
if (DuplicateHandle(GetCurrentProcess(), info_od->handle,
GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS))
{
int wxflag = info_od->wxflag & ~_O_NOINHERIT;
int wxflag = info_od->wxflag & ~WX_DONTINHERIT;
if (info_nd->wxflag & WX_OPEN)
_close(nd);