From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Description of problem: in dhcpcd-1.3.18pl8-10 the prog try to make a sigaction on SIGKILL and report a error on syslog. like: "dhcpcd[1975]: dhcpConfig: ioctl SIOCADDRT: Invalid argument" Version-Release number of selected component (if applicable): dhcpcd-1.3.18pl8-10 How reproducible: Always Steps to Reproduce: 1. just start dhcpcd with some debug 2. strace /sbin/dhcpcd -d -n -H eth0 2>&1 |grep rt_sigaction Actual Results: . . rt_sigaction(SIGBUS, {0x80494b0, [], 0x4000000}, NULL, 8) = 0 rt_sigaction(SIGFPE, {0x80494b0, [], 0x4000000}, NULL, 8) = 0 rt_sigaction(SIGKILL, {0x80494b0, [], 0x4000000}, NULL, 8) = -1 EINVAL (Invalid argument) rt_sigaction(SIGUSR1, {0x80494b0, [], 0x4000000}, NULL, 8) = 0 rt_sigaction(SIGSEGV, {0x80494b0, [], 0x4000000}, NULL, 8) = 0 . . Expected Results: when read the man of sigaction we see: signum specifies the signal and can be any valid signal except SIGKILL and SIGSTOP. Additional info: Just do a report to the dhcpcd maintener. or just patch the source code for avoid this stupid message. Have a nice day. Mehdi Farhat.
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...