Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
lvm2
sigterm_in_main_thread.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sigterm_in_main_thread.diff of Package lvm2
Index: LVM2.2.02.45/daemons/clvmd/clvmd.c =================================================================== --- LVM2.2.02.45.orig/daemons/clvmd/clvmd.c +++ LVM2.2.02.45/daemons/clvmd/clvmd.c @@ -374,9 +374,11 @@ int main(int argc, char *argv[]) signal(SIGHUP, sighup_handler); signal(SIGPIPE, SIG_IGN); - /* Block SIGUSR2 in the main process */ + /* Block SIGUSR2/SIGINT/SIGTERM in process */ sigemptyset(&ss); sigaddset(&ss, SIGUSR2); + sigaddset(&ss, SIGINT); + sigaddset(&ss, SIGTERM); sigprocmask(SIG_BLOCK, &ss, NULL); /* Initialise the LVM thread variables */ @@ -671,6 +673,11 @@ static void main_loop(int local_sock, in { DEBUGLOG("Using timeout of %d seconds\n", cmd_timeout); + sigset_t ss; + sigemptyset(&ss); + sigaddset(&ss, SIGINT); + sigaddset(&ss, SIGTERM); + pthread_sigmask(SIG_UNBLOCK, &ss, NULL); /* Main loop */ while (!quit) { fd_set in; @@ -809,6 +816,8 @@ static void main_loop(int local_sock, in } closedown: + + pthread_sigmask(SIG_BLOCK, &ss, NULL); clops->cluster_closedown(); close(local_sock); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor