While analysing issue, described in https://bugs.gentoo.org/show_bug.cgi?id=432962 I've find the following issue:
# /etc/init.d/apache2 stop
* Stopping apache2 ...
apache2: Syntax error on line 155 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib64/apache2/modules/libphp5.so into server: /usr/lib64/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory [ ok ]
# /etc/init.d/apache2 status
* status: stopped
But (after rebuild php):
# /etc/init.d/apache2 start
* Starting apache2 ...
* start-stop-daemon: /usr/sbin/apache2 is already running [ ok ]
I.e. start-stop-daemon reports, that apache daemon status is "started", so previously reported by init script status ("stopped") is not correct.
Does this problem still exist in >=www-servers/apache-2.2.25? I did some rework of apache's init script and might have already addressed this problem.
(In reply to Lars Wendler (Polynomial-C) from comment #1)
> Does this problem still exist in >=www-servers/apache-2.2.25? I did some
> rework of apache's init script and might have already addressed this problem.
Placing into /etc/apache2/httpd.conf the test line with fake module:
LoadModule test modules/test.so
command fail (apache is not marked as stopped).
So, return codes are handled correctly, the bug looks to be fixed.