Sebastian Lackner : ntdll: Use FD_CLOEXEC instead of hardcoded values.
Alexandre Julliard
julliard at winehq.org
Tue Mar 7 15:43:59 CST 2017
Module: wine
Branch: master
Commit: 9d0a48da0f9878a656406860a596a0f3df17cbb2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d0a48da0f9878a656406860a596a0f3df17cbb2
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Tue Mar 7 16:09:32 2017 +0100
ntdll: Use FD_CLOEXEC instead of hardcoded values.
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/server.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index ec517fc..ac3183b 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -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" );
}
More information about the wine-cvs
mailing list