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
8a971bfe
Commit
8a971bfe
authored
Apr 04, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed file descriptor leaks.
parent
a57d77a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
x11drv_main.c
dlls/x11drv/x11drv_main.c
+2
-0
file.c
files/file.c
+1
-8
client.c
scheduler/client.c
+1
-1
No files found.
dlls/x11drv/x11drv_main.c
View file @
8a971bfe
...
...
@@ -5,6 +5,7 @@
* Copyright 2000 Alexandre Julliard
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <X11/cursorfont.h>
...
...
@@ -169,6 +170,7 @@ static void process_attach(void)
argv0
,
Options
.
display
?
Options
.
display
:
"(none specified)"
);
ExitProcess
(
1
);
}
fcntl
(
ConnectionNumber
(
display
),
F_SETFD
,
1
);
/* set close on exec flag */
screen
=
DefaultScreenOfDisplay
(
display
);
visual
=
DefaultVisual
(
display
,
DefaultScreen
(
display
)
);
root_window
=
DefaultRootWindow
(
display
);
...
...
files/file.c
View file @
8a971bfe
...
...
@@ -309,16 +309,9 @@ void FILE_SetDosError(void)
*/
HFILE
FILE_DupUnixHandle
(
int
fd
,
DWORD
access
)
{
int
unix_handle
;
struct
alloc_file_handle_request
*
req
=
get_req_buffer
();
if
((
unix_handle
=
dup
(
fd
))
==
-
1
)
{
FILE_SetDosError
();
return
INVALID_HANDLE_VALUE
;
}
req
->
access
=
access
;
server_call_fd
(
REQ_ALLOC_FILE_HANDLE
,
unix_handle
,
NULL
);
server_call_fd
(
REQ_ALLOC_FILE_HANDLE
,
fd
,
NULL
);
return
req
->
handle
;
}
...
...
scheduler/client.c
View file @
8a971bfe
...
...
@@ -390,7 +390,7 @@ int CLIENT_InitServer(void)
if
((
env_fd
=
getenv
(
"__WINE_FD"
))
&&
isdigit
(
env_fd
[
0
]))
{
fd
=
atoi
(
env_fd
);
if
(
fcntl
(
fd
,
F_
GETFL
,
0
)
!=
-
1
)
return
fd
;
if
(
fcntl
(
fd
,
F_
SETFD
,
1
)
!=
-
1
)
return
fd
;
/* set close on exec flag */
}
/* retrieve the current directory */
...
...
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