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
839dfda7
Commit
839dfda7
authored
Dec 26, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save the registry before exiting on a SIGTERM.
parent
d0642b53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
select.c
server/select.c
+14
-0
No files found.
server/select.c
View file @
839dfda7
...
...
@@ -208,6 +208,13 @@ static void sighup_handler()
#endif
}
/* SIGTERM handler */
static
void
sigterm_handler
()
{
close_registry
();
exit
(
1
);
}
/* server main loop */
void
select_loop
(
void
)
{
...
...
@@ -219,6 +226,9 @@ void select_loop(void)
sigemptyset
(
&
sigset
);
sigaddset
(
&
sigset
,
SIGCHLD
);
sigaddset
(
&
sigset
,
SIGHUP
);
sigaddset
(
&
sigset
,
SIGINT
);
sigaddset
(
&
sigset
,
SIGQUIT
);
sigaddset
(
&
sigset
,
SIGTERM
);
sigprocmask
(
SIG_BLOCK
,
&
sigset
,
NULL
);
/* set the handlers */
...
...
@@ -228,6 +238,10 @@ void select_loop(void)
sigaction
(
SIGCHLD
,
&
action
,
NULL
);
action
.
sa_handler
=
sighup_handler
;
sigaction
(
SIGHUP
,
&
action
,
NULL
);
action
.
sa_handler
=
sigterm_handler
;
sigaction
(
SIGINT
,
&
action
,
NULL
);
sigaction
(
SIGQUIT
,
&
action
,
NULL
);
sigaction
(
SIGTERM
,
&
action
,
NULL
);
while
(
active_users
)
{
...
...
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