Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 238817 Details for
Bug 296267
net-dialup/ppp version update to 2.4.5 request
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/patch/wait-children.patch
wait-children.patch (text/plain), 1.99 KB, created by
Marshall McMullen
on 2010-07-15 04:48:50 UTC
(
hide
)
Description:
files/patch/wait-children.patch
Filename:
MIME Type:
Creator:
Marshall McMullen
Created:
2010-07-15 04:48:50 UTC
Size:
1.99 KB
patch
obsolete
>diff -Nru ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c >--- ppp-2.4.4.orig/pppd/main.c 2006-11-03 11:28:38.000000000 +0200 >+++ ppp-2.4.4/pppd/main.c 2006-11-03 11:30:49.080255750 +0200 >@@ -248,6 +248,7 @@ > static void forget_child __P((int pid, int status)); > static int reap_kids __P((void)); > static void childwait_end __P((void *)); >+static void wait_children __P((void)); > > #ifdef USE_TDB > static void update_db_entry __P((void)); >@@ -579,25 +580,11 @@ > if (!persist) > break; > } >+ >+ wait_children(); > } > >- /* Wait for scripts to finish */ >- reap_kids(); >- if (n_children > 0) { >- if (child_wait > 0) >- TIMEOUT(childwait_end, NULL, child_wait); >- if (debug) { >- struct subprocess *chp; >- dbglog("Waiting for %d child processes...", n_children); >- for (chp = children; chp != NULL; chp = chp->next) >- dbglog(" script %s, pid %d", chp->prog, chp->pid); >- } >- while (n_children > 0 && !childwait_done) { >- handle_events(); >- if (kill_link && !childwait_done) >- childwait_end(NULL); >- } >- } >+ wait_children(); > > die(status); > return 0; >@@ -1776,6 +1763,36 @@ > } > > /* >+ * wait_children - wait for scripts to finish. >+ * if child_wait is 0, wait indefinitely. >+ * else, kill'em all at the end of timeout >+ */ >+static void >+wait_children() >+{ >+ /* Wait for scripts to finish */ >+ reap_kids(); >+ if (n_children > 0) { >+ childwait_done = 0; >+ if (child_wait > 0) >+ TIMEOUT(childwait_end, NULL, child_wait); >+ if (debug) { >+ struct subprocess *chp; >+ dbglog("Waiting for %d child processes...", n_children); >+ for (chp = children; chp != NULL; chp = chp->next) >+ dbglog(" script %s, pid %d", chp->prog, chp->pid); >+ } >+ while (n_children > 0 && !childwait_done) { >+ handle_events(); >+ if (asked_to_quit && !childwait_done) >+ childwait_end(NULL); >+ } >+ if (child_wait > 0) >+ UNTIMEOUT(childwait_end, NULL); >+ } >+} >+ >+/* > * childwait_end - we got fed up waiting for the child processes to > * exit, send them all a SIGTERM. > */
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 296267
:
238813
|
238815
| 238817 |
238819
|
238821
|
238823
|
238825
|
238827
|
238829
|
238831
|
238833