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
24ec4a6e
Commit
24ec4a6e
authored
Jun 20, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Move the process pipe hangup handling into kill_process.
This ensures that it's also done correctly when a read from the pipe returns EOF.
parent
56d53322
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
process.c
server/process.c
+15
-12
No files found.
server/process.c
View file @
24ec4a6e
...
...
@@ -459,18 +459,7 @@ static void process_poll_event( struct fd *fd, int event )
struct
process
*
process
=
get_fd_user
(
fd
);
assert
(
process
->
obj
.
ops
==
&
process_ops
);
if
(
event
&
(
POLLERR
|
POLLHUP
))
{
release_object
(
process
->
msg_fd
);
process
->
msg_fd
=
NULL
;
if
(
process
->
sigkill_timeout
)
/* already waiting for it to die */
{
remove_timeout_user
(
process
->
sigkill_timeout
);
process
->
sigkill_timeout
=
NULL
;
process_died
(
process
);
}
else
kill_process
(
process
,
0
);
}
if
(
event
&
(
POLLERR
|
POLLHUP
))
kill_process
(
process
,
0
);
else
if
(
event
&
POLLIN
)
receive_fd
(
process
);
}
...
...
@@ -736,6 +725,20 @@ void resume_process( struct process *process )
/* kill a process on the spot */
void
kill_process
(
struct
process
*
process
,
int
violent_death
)
{
if
(
!
violent_death
&&
process
->
msg_fd
)
/* normal termination on pipe close */
{
release_object
(
process
->
msg_fd
);
process
->
msg_fd
=
NULL
;
}
if
(
process
->
sigkill_timeout
)
/* already waiting for it to die */
{
remove_timeout_user
(
process
->
sigkill_timeout
);
process
->
sigkill_timeout
=
NULL
;
process_died
(
process
);
return
;
}
if
(
violent_death
)
terminate_process
(
process
,
NULL
,
1
);
else
{
...
...
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