Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
53bc6c7a
Commit
53bc6c7a
authored
Nov 26, 2022
by
Michel Zou
Committed by
Alexandre Julliard
Nov 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix errno set on dup from read-only file.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53950
parent
7ca1eff8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
file.c
dlls/msvcrt/file.c
+1
-0
file.c
dlls/msvcrt/tests/file.c
+6
-0
No files found.
dlls/msvcrt/file.c
View file @
53bc6c7a
...
...
@@ -1244,6 +1244,7 @@ int CDECL _dup2(int od, int nd)
if
(
info_nd
==
&
MSVCRT___badioinfo
)
{
*
_errno
()
=
EBADF
;
ret
=
-
1
;
}
else
if
(
info_od
->
wxflag
&
WX_OPEN
)
...
...
dlls/msvcrt/tests/file.c
View file @
53bc6c7a
...
...
@@ -267,6 +267,12 @@ static void test_readmode( BOOL ascii_mode )
close
(
fd
);
fd
=
open
(
"fdopen.tst"
,
O_RDONLY
,
_S_IREAD
|
_S_IWRITE
);
errno
=
0xdeadbeef
;
ok
(
dup2
(
fd
,
-
1
)
==
-
1
,
"dup2(fd, -1) succeeded
\n
"
);
ok
(
errno
==
EBADF
,
"errno = %d
\n
"
,
errno
);
close
(
fd
);
if
(
ascii_mode
)
{
/* Open file in ascii mode */
fd
=
open
(
"fdopen.tst"
,
O_RDONLY
);
...
...
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