Bug 61421
Summary: | Wrong usage of sigaction in dhcpcd | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | mehdi.farhat <mehdi.farhat> | ||||
Component: | dhcpcd | Assignee: | Elliot Lee <sopwith> | ||||
Status: | CLOSED WONTFIX | QA Contact: | |||||
Severity: | low | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.2 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2002-03-19 14:28:01 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
mehdi.farhat
2002-03-19 14:27:56 UTC
The slightly broken sigaction usage is not causing the ioctl to fail. (dhcpcd's signalSetup() function is doing a loop over all the signal numbers from 1 through 15 to set the sigHandler for them. Not great, but forgiveable). Here a sample patch to avoid message in the syslog... Have a nice day :) ____________________ diff -Naur dhcpcd-1.3.22-pl1/signals.c dhcpcd-1.3.22-pl1.new/signals.c --- dhcpcd-1.3.22-pl1/signals.c Sun Jan 20 23:51:46 2002 +++ dhcpcd-1.3.22-pl1.new/signals.c Thu May 2 14:30:03 2002 @@ -129,11 +129,11 @@ /*****************************************************************************/ void signalSetup() { - int i; + int signum[]={1,2,3,4,5,6,7,8,10,11,12,13,14,15,17,0}; + int i=0; struct sigaction action; sigaction(SIGHUP,NULL,&action); action.sa_handler= &sigHandler; action.sa_flags = 0; - for (i=1;i<16;i++) sigaction(i,&action,NULL); - sigaction(SIGCHLD,&action,NULL); + while(signum[i]>0){sigaction(signum[i++],&action,NULL);} } Created attachment 56285 [details]
signals.c.patch for avoid a strange syslog message...
|