The Samba-Bugzilla – Attachment 9868 Details for
Bug 10562
Cleanup idle winbindd child processes.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Every 3 minutes check the size of the request queue in the child winbindd process and exit if there are none.
winbindd_exit_idle_child.patch (text/plain), 1.88 KB, created by
ravindra (mail address dead)
on 2014-04-24 13:43:03 UTC
(
hide
)
Description:
Every 3 minutes check the size of the request queue in the child winbindd process and exit if there are none.
Filename:
MIME Type:
Creator:
ravindra (mail address dead)
Created:
2014-04-24 13:43:03 UTC
Size:
1.88 KB
patch
obsolete
>diff --git a/source3/winbindd/winbindd.h b/source3/winbindd/winbindd.h >index 8f89e27..b7b9f1c 100644 >--- a/source3/winbindd/winbindd.h >+++ b/source3/winbindd/winbindd.h >@@ -145,6 +145,7 @@ struct winbindd_child { > > struct tevent_timer *lockout_policy_event; > struct tevent_timer *machine_password_change_event; >+ struct tevent_timer *check_to_exit_child_event; > > const struct winbindd_child_dispatch_table *table; > }; >diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c >index de254e9..2804251 100644 >--- a/source3/winbindd/winbindd_dual.c >+++ b/source3/winbindd/winbindd_dual.c >@@ -1368,6 +1368,33 @@ static void child_handler(struct tevent_context *ev, struct tevent_fd *fde, > } > } > >+static void check_child_exit_handler(struct tevent_context *ctx, >+ struct tevent_timer *te, >+ struct timeval now, >+ void *private_data) >+{ >+ struct winbindd_child *child = (struct winbindd_child *)private_data; >+ >+ DEBUG(10,("check_child_exit_handler called %d \n", >+ (int)tevent_queue_length(child->queue))); >+ >+ TALLOC_FREE(child->check_to_exit_child_event); >+ >+ if (tevent_queue_length(child->queue) <= 1 ) { >+ DEBUG(1, ("Exiting child : from check_child_exit_handler \n")); >+ exit(1); >+ } >+ >+ /* re-install timer */ >+ >+ child->check_to_exit_child_event = tevent_add_timer(winbind_event_context(), NULL, >+ timeval_current_ofs(3*60, 0), >+ check_child_exit_handler, >+ child); >+ >+} >+ >+ > static bool fork_domain_child(struct winbindd_child *child) > { > int fdpair[2]; >@@ -1549,6 +1576,15 @@ static bool fork_domain_child(struct winbindd_child *child) > _exit(1); > } > >+ if (!child->check_to_exit_child_event) { >+ >+ child->check_to_exit_child_event = tevent_add_timer( >+ winbind_event_context(), NULL, >+ timeval_current_ofs(3*60, 0), >+ check_child_exit_handler, >+ child); >+ } >+ > while (1) { > > int ret;
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 Raw
Actions:
View
Attachments on
bug 10562
: 9868 |
9875
|
9899
|
9919