Summary: | make_child return value not checked | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Brian McQueen <mcqueen> |
Component: | mpm_prefork | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | normal | Keywords: | PatchAvailable |
Priority: | P2 | ||
Version: | 2.4-HEAD | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
checking return value of make_child
checking return value of make_child() |
Description
Brian McQueen
2008-12-17 16:00:00 UTC
Created attachment 23036 [details]
checking return value of make_child
Created attachment 32645 [details]
checking return value of make_child()
make_child()'s return value is still not checked even with httpd-2.4.
This also affects all these three workers:
- event
- prefork
- worker
Looking at httpd-2.4, the return value for make_child() appears to return 0 when there is no failure.
I suggest:
if (make_child(ap_server_conf, child_slot) >= 0) {
--remaining_children_to_start;
}
Instead of:
if (make_child(ap_server_conf, child_slot) > 0) {
--remaining_children_to_start;
}
because in the case of a return value of 0, the remaining_children_to_start should still be decremented.
|