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
3557b981
Commit
3557b981
authored
Aug 23, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Avoid a potential server crash when a thread dies on startup.
parent
a2ca2ebd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
thread.c
server/thread.c
+15
-13
No files found.
server/thread.c
View file @
3557b981
...
...
@@ -1102,8 +1102,18 @@ DECL_HANDLER(init_thread)
{
unsigned
int
prefix_cpu_mask
=
get_prefix_cpu_mask
();
struct
process
*
process
=
current
->
process
;
int
reply_fd
=
thread_get_inflight_fd
(
current
,
req
->
reply_fd
);
int
wait_fd
=
thread_get_inflight_fd
(
current
,
req
->
wait_fd
);
int
wait_fd
,
reply_fd
;
if
((
reply_fd
=
thread_get_inflight_fd
(
current
,
req
->
reply_fd
))
==
-
1
)
{
set_error
(
STATUS_TOO_MANY_OPENED_FILES
);
return
;
}
if
((
wait_fd
=
thread_get_inflight_fd
(
current
,
req
->
wait_fd
))
==
-
1
)
{
set_error
(
STATUS_TOO_MANY_OPENED_FILES
);
goto
error
;
}
if
(
current
->
reply_fd
)
/* already initialised */
{
...
...
@@ -1111,19 +1121,11 @@ DECL_HANDLER(init_thread)
goto
error
;
}
if
(
reply_fd
==
-
1
||
fcntl
(
reply_fd
,
F_SETFL
,
O_NONBLOCK
)
==
-
1
)
goto
error
;
if
(
fcntl
(
reply_fd
,
F_SETFL
,
O_NONBLOCK
)
==
-
1
)
goto
error
;
current
->
reply_fd
=
create_anonymous_fd
(
&
thread_fd_ops
,
reply_fd
,
&
current
->
obj
,
0
);
reply_fd
=
-
1
;
if
(
!
current
->
reply_fd
)
goto
error
;
if
(
wait_fd
==
-
1
)
{
set_error
(
STATUS_TOO_MANY_OPENED_FILES
);
/* most likely reason */
return
;
}
if
(
!
(
current
->
wait_fd
=
create_anonymous_fd
(
&
thread_fd_ops
,
wait_fd
,
&
current
->
obj
,
0
)))
return
;
current
->
wait_fd
=
create_anonymous_fd
(
&
thread_fd_ops
,
wait_fd
,
&
current
->
obj
,
0
);
if
(
!
current
->
reply_fd
||
!
current
->
wait_fd
)
return
;
if
(
!
is_valid_address
(
req
->
teb
))
{
...
...
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