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
3acc2068
Commit
3acc2068
authored
Nov 15, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Cope with stdio file descriptors being closed on startup.
parent
1ff5f3d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
request.c
server/request.c
+7
-6
No files found.
server/request.c
View file @
3acc2068
...
...
@@ -758,6 +758,10 @@ void open_master_socket(void)
assert
(
sizeof
(
union
generic_request
)
==
sizeof
(
struct
request_max_size
)
);
assert
(
sizeof
(
union
generic_reply
)
==
sizeof
(
struct
request_max_size
)
);
/* make sure the stdio fds are open */
fd
=
open
(
"/dev/null"
,
O_RDWR
);
while
(
fd
>=
0
&&
fd
<=
2
)
fd
=
dup
(
fd
);
if
(
!
server_dir
)
fatal_error
(
"directory %s cannot be accessed
\n
"
,
config_dir
);
if
(
chdir
(
config_dir
)
==
-
1
)
fatal_perror
(
"chdir to %s"
,
config_dir
);
if
((
config_dir_fd
=
open
(
"."
,
O_RDONLY
))
==
-
1
)
fatal_perror
(
"open %s"
,
config_dir
);
...
...
@@ -777,12 +781,8 @@ void open_master_socket(void)
acquire_lock
();
/* close stdin and stdout */
if
((
fd
=
open
(
"/dev/null"
,
O_RDWR
))
!=
-
1
)
{
dup2
(
fd
,
0
);
dup2
(
fd
,
1
);
close
(
fd
);
}
dup2
(
fd
,
0
);
dup2
(
fd
,
1
);
/* signal parent */
dummy
=
0
;
...
...
@@ -813,6 +813,7 @@ void open_master_socket(void)
/* init the process tracing mechanism */
init_tracing_mechanism
();
close
(
fd
);
}
/* master socket timer expiration handler */
...
...
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