View | Details | Raw Unified | Return to bug 217297
Collapse All | Expand All

(-)fcgiwrap (-2 / +13 lines)
Lines 87-93 Link Here
87
	fi
87
	fi
88
}
88
}
89
89
90
fcgiwrap_cleansocket() {
90
fcgiwrap_stop() {
91
	fcgiwrap_pgrp=$(/bin/ps -o ppid= $(cat ${pidfile}))
92
	if [ -z "$fcgiwrap_pgrp" ] || ! kill -0 $fcgiwrap_pgrp; then
93
		[ -n "$rc_fast" ] && return 0
94
		_run_rc_notrunning
95
		return 1
96
	fi
97
	fcgiwrap_pgrp_pids=$(/bin/pgrep -d ' ' -g ${fcgiwrap_pgrp})
98
	echo "Stopping ${name}."
99
	kill -TERM -- -${fcgiwrap_pgrp}
100
	wait_for_pids ${fcgiwrap_pgrp_pids}
101
91
	# Workaround the fact that fcgiwrap doesn't cleanup his socket at stopping
102
	# Workaround the fact that fcgiwrap doesn't cleanup his socket at stopping
92
	case ${fcgiwrap_socket} in 
103
	case ${fcgiwrap_socket} in 
93
		unix*)
104
		unix*)
Lines 104-110 Link Here
104
command="/usr/sbin/daemon"
115
command="/usr/sbin/daemon"
105
start_precmd="fcgiwrap_precmd"
116
start_precmd="fcgiwrap_precmd"
106
start_postcmd="fcgiwrap_postcmd"
117
start_postcmd="fcgiwrap_postcmd"
107
stop_postcmd="fcgiwrap_cleansocket"
118
stop_cmd="fcgiwrap_stop"
108
119
109
load_rc_config $name
120
load_rc_config $name
110
121

Return to bug 217297