supervise/daemontools conflicts with apache -D FOREGROUND

Posted by Kevin G. on Server Fault See other posts from Server Fault or by Kevin G.
Published on 2012-08-15T00:41:52Z Indexed on 2012/11/07 11:06 UTC
Read the original article Hit count: 225

Filed under:
|

Hoping that somebody can help us understand this behavior.

We've got a bunch of daemontools services under /etc/service/. One of the services controls apache, and the run script has this in it.

exec envdir /var/lib/supervise/wwwproxy/env setuidgid root bash <<-BASH
    ulimit -n 8192  # also increase the running user's file descriptor limit
    exec apache2 -f /path/to/demo_apache2.conf -D FOREGROUND
BASH 

We were having the problem that svc -d /etc/service/* actually had the effect of restarting all the services, it didn't take them down. We finally tracked it down to that one service, and found that svc -d /etc/service/apache2 would bring up any other service was down, including itself.

Changing FOREGROUND to NO_DAEMONIZE fixes the behavior, but we'd really like to understand what's going on. Can anybody explain why an svc -d on one service would bring an other service up?

Thanks for any clue you can offer.

© Server Fault or respective owner

Related posts about apache2

Related posts about daemontools