Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
iputils
iputils-s20101006-sec-ping-unblock.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File iputils-s20101006-sec-ping-unblock.diff of Package iputils
From bf83678619dd0286f7a66f2ab02763751b0e8ca9 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke <hare@suse.de> Date: Mon, 26 Aug 2013 13:02:36 +0200 Subject: Block SIGALRM in ping.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ping depends on SIGALRM to exit eventually, so we need to mask it with UNBLOCK. Signed-off-by: Marcus Schäfer <ms@suse.de> Signed-off-by: Hannes Reinecke <hare@suse.de> --- ping.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ping.c b/ping.c index 71b445d..0357c3d 100644 --- a/ping.c +++ b/ping.c @@ -139,6 +139,16 @@ main(int argc, char **argv) enable_capability_raw(); + /* + * ping depend on SIGALARM to exit sometimes, + * but to popen, system, fork carry on parent signal handler + * so we mask it ourself. + */ + sigset_t s; + sigaddset(&s, SIGALRM); + sigprocmask(SIG_UNBLOCK, &s, NULL); + set_signal(SIGALRM, doexit); + icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); socket_errno = errno; -- 1.8.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