Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 91522 Details for
Bug 139179
net-misc/dhcpcd-2.0.7 + ppc gcc-4.1.1 with -O3 has breakages.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
2.0.5 - 2.0.6 signals only patch
x (text/plain), 2.45 KB, created by
Roy Marples (RETIRED)
on 2006-07-11 16:30:13 UTC
(
hide
)
Description:
2.0.5 - 2.0.6 signals only patch
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2006-07-11 16:30:13 UTC
Size:
2.45 KB
patch
obsolete
>diff -u dhcpcd-2.0.5/src/client.c dhcpcd-2.0.6/src/client.c >--- dhcpcd-2.0.5/src/client.c 2006-04-27 22:18:29.000000000 +0100 >+++ dhcpcd-2.0.6/src/client.c 2006-06-05 11:47:11.000000000 +0100 >@@ -99,8 +91,6 @@ > int deleteDhcpCache(); > void execute_on_change(char *prm); > >-int execOnStop = 1; >- > int dhcpSocket; > int udpFooSocket; > int prev_ip_addr; >@@ -105,7 +105,7 @@ > dhcpOptions DhcpOptions; > dhcpInterface DhcpIface; > udpipMessage UdpIpMsgSend,UdpIpMsgRecv; >-jmp_buf env; >+sigjmp_buf env; > unsigned char ClientHwAddr[ETH_ALEN]; > > const struct ip *ipSend=(struct ip *)((struct udpiphdr *)UdpIpMsgSend.udpipmsg)->ip; >@@ -1307,8 +1308,6 @@ > if ( ntp_renamed ) > rename(ntp_file_sv, ntp_file); > >- if ( ! execOnStop ) return &dhcpStart; >- > if ( ! stat("/sbin/resolvconf", &buf) ) > { > #ifdef EMBED >diff -u dhcpcd-2.0.5/src/signals.c dhcpcd-2.0.6/src/signals.c >--- dhcpcd-2.0.5/src/signals.c 2006-04-27 22:18:29.000000000 +0100 >+++ dhcpcd-2.0.6/src/signals.c 2006-06-05 11:47:11.000000000 +0100 >@@ -39,10 +39,12 @@ > extern char *IfNameExt; > extern char *ConfigDir; > extern int Persistent; >-extern jmp_buf env; >+extern sigjmp_buf env; > extern void *(*currState)(); > extern int execOnStop; > >+sigjmp_buf jmpTerm; >+ > /*****************************************************************************/ > void killPid(sig) > int sig; >@@ -127,16 +129,15 @@ > } > logger(LOG_ERR, "terminating on signal %d",sig); > } >- if (!Persistent || sig != SIGTERM) >- { >- /* Disable execing programs on SIGTERM as if any services get restarted then >- * they get hung and are un-useable even though they do get restarted and >- * apparently without error. Fix this, as it as a dhcpcd error! */ >- if (sig == SIGTERM) execOnStop = 0; >- dhcpStop(); >- } >+ if (sig == SIGTERM) siglongjmp(jmpTerm, 1); >+ if (!Persistent) dhcpStop(); > deletePidFile(); >- exit(sig); >+ >+ /* Exit with 0 if we were told to quit, otherwise the SIG code */ >+ if (sig == SIGQUIT || sig == SIGINT || sig == SIGHUP) >+ exit(0); >+ else >+ exit(sig); > } > /*****************************************************************************/ > void signalSetup() >@@ -148,4 +149,11 @@ > action.sa_flags = 0; > for (i=1;i<16;i++) sigaction(i,&action,NULL); > sigaction(SIGCHLD,&action,NULL); >+ >+ /* We do this so that we can call external programs safely from a SIGTERM */ >+ if ( sigsetjmp(jmpTerm, 1) ) { >+ if (!Persistent) dhcpStop(); >+ deletePidFile(); >+ exit(0); >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 139179
:
90849
|
90850
|
90851
|
90852
|
90853
|
90854
|
90858
|
90859
|
91522
|
91702
|
91703
|
92504