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
ee020079
Commit
ee020079
authored
Nov 09, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Track separately implicit and explicit file disposition.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1affd75f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
fd.c
server/fd.c
+5
-3
No files found.
server/fd.c
View file @
ee020079
...
...
@@ -166,7 +166,7 @@ struct closed_fd
{
struct
list
entry
;
/* entry in inode closed list */
int
unix_fd
;
/* the unix file descriptor */
int
unlink
;
/* whether to unlink on close */
int
unlink
;
/* whether to unlink on close
: -1 - implicit FILE_DELETE_ON_CLOSE, 1 - explicit disposition
*/
char
*
unix_name
;
/* name to unlink on close, points to parent fd unix_name */
};
...
...
@@ -1869,7 +1869,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
goto
error
;
}
fd
->
closed
->
unlink
=
(
options
&
FILE_DELETE_ON_CLOSE
)
!=
0
;
fd
->
closed
->
unlink
=
(
options
&
FILE_DELETE_ON_CLOSE
)
?
-
1
:
0
;
if
(
flags
&
O_TRUNC
)
{
if
(
S_ISDIR
(
st
.
st_mode
))
...
...
@@ -2314,7 +2314,9 @@ static void set_fd_disposition( struct fd *fd, int unlink )
return
;
}
fd
->
closed
->
unlink
=
unlink
||
(
fd
->
options
&
FILE_DELETE_ON_CLOSE
);
fd
->
closed
->
unlink
=
unlink
?
1
:
0
;
if
(
fd
->
options
&
FILE_DELETE_ON_CLOSE
)
fd
->
closed
->
unlink
=
-
1
;
}
/* set new name for the fd */
...
...
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