Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to set a property on the root Apache process which in inherited by its children (e.g. oom_adj, cgroup membership). However, Apache will fork itself as soon as it starts.

  • Using $$ in the init.d script doesn't seem to work - nothing is affected after the init script exits.
  • Using the value from the PID file is too late - only the root process is affected, after it has created workers.

Any solutions? (aside from hacky ideas like enumerating "apache2" processes)

share|improve this question
up vote 0 down vote accepted

Using $$ in the init.d script didn't work, but using it in a separate script called by the init.d script worked.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.