Project

General

Profile

Bug #1700

rc.lighttpd.redhat does not work on rhel 5 with non-standard pid file location and chroot

Added by jrabbit about 11 years ago. Updated almost 11 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
documentation
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

In the following situation:

1. Centos/RHEL Version 5 (Tested on 5.1, assuming it affects 5.0 too, does not happen on 4.6)

2. server.pid-file is set in the configuration file to be somewhere other than /var/run/lighttpd.pid

3. Chroot is being used

The rc.lighttpd.redhat fails to detect a running copy of lighttpd as it cannot find the pid. This is because the __pids_pidof function in /etc/rc.d/init.d/functions has been changed between RHEL 4 and RHEL 5 to use "pidof -c" instead of just "pidof" which means it will only find processes running in the same root folder. When lighttpd runs with chroot, this is not the case, so unless the pid file is in /var/run/lighttpd.pid, it is not found.

It can be fixed by manually including the old version of the function in the script below the inclusion of /etc/rc.d/init.d/functions to override the version defined in that file.

__pids_pidof() {
pidof -o $$ -o $PPID -o %PPID -x "$1" || \
pidof -o $$ -o $PPID -o %PPID -x "${1##*/}"
}

History

#1

Updated by jrabbit about 11 years ago

(note: there should be a double underscore on the front of the function name pids_pidof - trac took it as a formatting command)

#2

Updated by stbuehler about 11 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

I don't see why that should be a bug in lighty - looks more like a bug in rhel.

And i don't think we should include this function.

#3

Updated by stbuehler almost 11 years ago

  • Status changed from Fixed to Invalid

Also available in: Atom