In response to sam at liddicott dot com:
it isin't so simple! You should never kill an apache process because it is automatically freed when apache need!
And, if you use apache worker or thread based mpm you risk to kill the entire process!
result: DO NOT USE THIS FUNCTION!