Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
sssd.3713
0002-Signals-Remove-unused-functions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Signals-Remove-unused-functions.patch of Package sssd.3713
From fea2d8c6aef70f1ba6f7528c261606eac4fcea1c Mon Sep 17 00:00:00 2001 From: Simo Sorce <simo@redhat.com> Date: Sat, 9 Nov 2013 15:44:45 -0500 Subject: [PATCH] Signals: Remove unused functions Cleanup unused signal functions (cherry picked from commit d054a96e102b53a3aab6602f531a0e8d254080ab) Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> --- src/util/signal.c | 57 ------------------------------------------------------- src/util/util.h | 2 -- 2 files changed, 59 deletions(-) diff --git src/util/signal.c src/util/signal.c index 053457b..bb8f8be 100644 --- src/util/signal.c +++ src/util/signal.c @@ -28,45 +28,6 @@ * @brief Signal handling */ -/**************************************************************************** - Catch child exits and reap the child zombie status. -****************************************************************************/ - -static void sig_cld(int signum) -{ - while (waitpid((pid_t)-1,(int *)NULL, WNOHANG) > 0) - ; - - /* - * Turns out it's *really* important not to - * restore the signal handler here if we have real POSIX - * signal handling. If we do, then we get the signal re-delivered - * immediately - hey presto - instant loop ! JRA. - */ - -#if !defined(HAVE_SIGACTION) - CatchSignal(SIGCLD, sig_cld); -#endif -} - -/**************************************************************************** -catch child exits - leave status; -****************************************************************************/ - -static void sig_cld_leave_status(int signum) -{ - /* - * Turns out it's *really* important not to - * restore the signal handler here if we have real POSIX - * signal handling. If we do, then we get the signal re-delivered - * immediately - hey presto - instant loop ! JRA. - */ - -#if !defined(HAVE_SIGACTION) - CatchSignal(SIGCLD, sig_cld_leave_status); -#endif -} - /** Block sigs. **/ @@ -126,21 +87,3 @@ void (*CatchSignal(int signum,void (*handler)(int )))(int) return signal(signum, handler); #endif } - -/** - Ignore SIGCLD via whatever means is necessary for this OS. -**/ - -void CatchChild(void) -{ - CatchSignal(SIGCLD, sig_cld); -} - -/** - Catch SIGCLD but leave the child around so it's status can be reaped. -**/ - -void CatchChildLeaveStatus(void) -{ - CatchSignal(SIGCLD, sig_cld_leave_status); -} diff --git src/util/util.h src/util/util.h index 7a66846..b0a7692 100644 --- src/util/util.h +++ src/util/util.h @@ -227,8 +227,6 @@ void sig_term(int sig); #include <signal.h> void BlockSignals(bool block, int signum); void (*CatchSignal(int signum,void (*handler)(int )))(int); -void CatchChild(void); -void CatchChildLeaveStatus(void); /* from memory.c */ typedef int (void_destructor_fn_t)(void *); -- 2.1.4
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