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
afc6962a
Commit
afc6962a
authored
Nov 11, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use fd critical section in _close.
parent
4508e665
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
file.c
dlls/msvcrt/file.c
+5
-6
No files found.
dlls/msvcrt/file.c
View file @
afc6962a
...
...
@@ -988,24 +988,23 @@ int CDECL MSVCRT__fflush_nolock(MSVCRT_FILE* file)
*/
int
CDECL
MSVCRT__close
(
int
fd
)
{
HANDLE
hand
;
ioinfo
*
info
=
get_ioinfo
(
fd
)
;
int
ret
;
LOCK_FILES
();
hand
=
msvcrt_fdtoh
(
fd
);
TRACE
(
":fd (%d) handle (%p)
\n
"
,
fd
,
hand
);
if
(
!
msvcrt_is_valid_fd
(
fd
))
{
TRACE
(
":fd (%d) handle (%p)
\n
"
,
fd
,
info
->
handle
);
if
(
!
(
info
->
wxflag
&
WX_OPEN
))
{
ret
=
-
1
;
}
else
{
ret
=
CloseHandle
(
info
->
handle
)
?
0
:
-
1
;
msvcrt_free_fd
(
fd
);
ret
=
CloseHandle
(
hand
)
?
0
:
-
1
;
if
(
ret
)
{
WARN
(
":failed-last error (%d)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
}
}
UNLOCK_FILES
();
TRACE
(
":ok
\n
"
);
release_ioinfo
(
info
);
return
ret
;
}
...
...
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