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
9d0a48da
Commit
9d0a48da
authored
Mar 07, 2017
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use FD_CLOEXEC instead of hardcoded values.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
97170a8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
server.c
dlls/ntdll/server.c
+3
-3
No files found.
dlls/ntdll/server.c
View file @
9d0a48da
...
...
@@ -1211,7 +1211,7 @@ static int server_connect(void)
/* retrieve the current directory */
fd_cwd
=
open
(
"."
,
O_RDONLY
);
if
(
fd_cwd
!=
-
1
)
fcntl
(
fd_cwd
,
F_SETFD
,
1
);
/* set close on exec flag */
if
(
fd_cwd
!=
-
1
)
fcntl
(
fd_cwd
,
F_SETFD
,
FD_CLOEXEC
);
setup_config_dir
();
serverdir
=
wine_get_server_dir
();
...
...
@@ -1274,7 +1274,7 @@ static int server_connect(void)
fchdir
(
fd_cwd
);
close
(
fd_cwd
);
}
fcntl
(
s
,
F_SETFD
,
1
);
/* set close on exec flag */
fcntl
(
s
,
F_SETFD
,
FD_CLOEXEC
);
return
s
;
}
close
(
s
);
...
...
@@ -1371,7 +1371,7 @@ void server_init_process(void)
if
(
env_socket
)
{
fd_socket
=
atoi
(
env_socket
);
if
(
fcntl
(
fd_socket
,
F_SETFD
,
1
)
==
-
1
)
if
(
fcntl
(
fd_socket
,
F_SETFD
,
FD_CLOEXEC
)
==
-
1
)
fatal_perror
(
"Bad server socket %d"
,
fd_socket
);
unsetenv
(
"WINESERVERSOCKET"
);
}
...
...
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