Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3a4c04dc
Commit
3a4c04dc
authored
Aug 14, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make sure to completely kill processes before returning from a wineserver -k.
parent
68e850e6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
request.c
server/request.c
+14
-6
request.h
server/request.h
+1
-1
signal.c
server/signal.c
+2
-1
No files found.
server/request.c
View file @
3a4c04dc
...
...
@@ -117,6 +117,7 @@ unsigned int global_error = 0; /* global error code for when no thread is curre
struct
timeval
server_start_time
=
{
0
,
0
};
/* server startup time */
static
struct
master_socket
*
master_socket
;
/* the master socket object */
static
int
force_shutdown
;
/* socket communication static structures */
static
struct
iovec
myiovec
;
...
...
@@ -497,7 +498,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
{
/* this is not supposed to happen */
fprintf
(
stderr
,
"wineserver: Error on master socket
\n
"
);
release_object
(
sock
);
set_fd_events
(
sock
->
fd
,
-
1
);
}
else
if
(
event
&
POLLIN
)
{
...
...
@@ -811,14 +812,14 @@ static void close_socket_timeout( void *arg )
flush_registry
();
/* if a new client is waiting, we keep on running */
if
(
check_fd_events
(
master_socket
->
fd
,
POLLIN
))
return
;
if
(
!
force_shutdown
&&
check_fd_events
(
master_socket
->
fd
,
POLLIN
))
return
;
if
(
debug_level
)
fprintf
(
stderr
,
"wineserver: exiting (pid=%ld)
\n
"
,
(
long
)
getpid
()
);
#ifdef DEBUG_OBJECTS
close_objects
();
/* shut down everything properly */
#endif
exit
(
0
);
exit
(
force_shutdown
);
}
/* close the master socket and stop waiting for new clients */
...
...
@@ -835,8 +836,15 @@ void close_master_socket(void)
else
close_socket_timeout
(
NULL
);
/* close it right away */
}
/*
lock/unlock the master socket to stop accepting new clients
*/
void
lock_master_socket
(
int
locked
)
/*
forced shutdown, used for wineserver -k
*/
void
shutdown_master_socket
(
void
)
{
set_fd_events
(
master_socket
->
fd
,
locked
?
0
:
POLLIN
);
force_shutdown
=
1
;
master_socket_timeout
=
0
;
if
(
master_socket
->
timeout
)
{
remove_timeout_user
(
master_socket
->
timeout
);
close_socket_timeout
(
NULL
);
}
set_fd_events
(
master_socket
->
fd
,
-
1
);
/* stop waiting for new clients */
}
server/request.h
View file @
3a4c04dc
...
...
@@ -58,7 +58,7 @@ extern void write_reply( struct thread *thread );
extern
unsigned
int
get_tick_count
(
void
);
extern
void
open_master_socket
(
void
);
extern
void
close_master_socket
(
void
);
extern
void
lock_master_socket
(
int
locked
);
extern
void
shutdown_master_socket
(
void
);
extern
int
wait_for_lock
(
void
);
extern
int
kill_lock_owner
(
int
sig
);
...
...
server/signal.c
View file @
3a4c04dc
...
...
@@ -38,6 +38,7 @@
#include "object.h"
#include "process.h"
#include "thread.h"
#include "request.h"
#if defined(linux) && defined(__SIGRTMIN)
/* the signal used by linuxthreads as exit signal for clone() threads */
...
...
@@ -185,7 +186,7 @@ static void sigint_callback(void)
{
kill_all_processes
(
NULL
,
1
);
flush_registry
();
exit
(
1
);
shutdown_master_socket
(
);
}
/* SIGHUP 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