borked apache

Marcin Król hawk at limanowa.net
Tue Mar 22 17:15:44 CET 2005


> Could you put set -x at beginning of daemon() in rc-scripts to see what 
> happens? (also in pidoffile() and similar ones).

OK, I've checked it. It enters loop in daemon():

                         i=0
                         while [ "$i" -lt "$waittime" ]; do
                                 checkpid $pid && sleep 1 || break
                         done

Am I blind, or $i isn't increased? So it'll never reach $waittime.

And here is result of set -x

++ pidofproc httpd.prefork ''
++ set -x
++ typeset pid pidfile base
+++ basename httpd.prefork
++ base=httpd.prefork
++ pidfile=httpd.prefork.pid
++ '[' -n '' ']'
++ '[' 2 = 0 ']'
++ '[' -f /var/run/httpd.prefork.pid ']'
++ '[' -z '' ']'
++ pidof -o 19244 -o 19241 -o %PPID -x httpd.prefork
+++ filter_chroot ''
+++ '[' 1 -lt 1 -o '!' -d /proc/1 ']'
+++ good_pids=
+++ echo
++ pid=
++ echo
+ pid=19214
+ '[' -z 19214 ']'
+ i=0
(the loop starts here)
+ '[' 0 -lt 60 ']'
+ checkpid 19214
+ '[' 19214 ']'
+ '[' -d /proc/19214 ']'
+ return 0
+ sleep 1
(and "ends" here)

M.




More information about the pld-devel-en mailing list