projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7b4f00
)
Clean up "dead" child if there's no thread associated with the request
author
Alan T. DeKok
<aland@freeradius.org>
Mon, 30 Nov 2009 08:14:27 +0000
(09:14 +0100)
committer
Alan T. DeKok
<aland@freeradius.org>
Mon, 30 Nov 2009 08:14:27 +0000
(09:14 +0100)
src/main/event.c
patch
|
blob
|
history
diff --git
a/src/main/event.c
b/src/main/event.c
index
ce9ce46
..
4134303
100644
(file)
--- a/
src/main/event.c
+++ b/
src/main/event.c
@@
-488,8
+488,14
@@
static void wait_for_child_to_die(void *ctx)
rad_assert(request->magic == REQUEST_MAGIC);
rad_assert(request->magic == REQUEST_MAGIC);
+ /*
+ * If it's still queued (waiting for a thread to pick it
+ * up) OR, it's running AND there's still a child thread
+ * handling it, THEN delay some more.
+ */
if ((request->child_state == REQUEST_QUEUED) ||
if ((request->child_state == REQUEST_QUEUED) ||
- (request->child_state == REQUEST_RUNNING)) {
+ ((request->child_state == REQUEST_RUNNING) &&
+ (pthread_equal(request->child_pid, NO_SUCH_CHILD_PID) == 0))) {
/*
* Cap delay at five minutes.
/*
* Cap delay at five minutes.