NetBSD Problem Report #45689

From  Mon Dec  5 20:40:30 2011
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 1B5FD63D9B7
	for <>; Mon,  5 Dec 2011 20:40:30 +0000 (UTC)
Message-Id: <>
Date: Mon,  5 Dec 2011 20:40:28 +0000 (UTC)
Subject: www/spawn-fcgi: add '_interpreter' variable to rc script
X-Send-Pr-Version: www-1.0

>Number:         45689
>Category:       pkg
>Synopsis:       www/spawn-fcgi: add '_interpreter' variable to rc script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    joerg
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 05 20:45:00 +0000 2011
>Last-Modified:  Tue Dec 06 06:10:10 +0000 2011
>Originator:     Matthias Rampke
>Release:        DragonFlyBSD HEAD
DragonFly 2.13-DEVELOPMENT DragonFly v2.13.0.451.g34910-DEVELOPMENT #1: Sat Dec  3 22:32:37 CET 2011  x86_64
The rc script for spawn-fcgi does not pass an interpreter to rc.subr's check_pid, causing the PID check (and thus e.g. stopping the corresponding spawnfcgi job) to fail if it is a #! script (e.g. #!/usr/pkg/bin/python2.7, in my case).

The patch below simply adds a spawnfcgi_${job}_interpreter variable that is passed to check_pid on a per-job-basis. For non-script jobs it need not be specified, thus current behaviour will remain unchanged unless this variable is set.
in rc.conf:

where "/path/to/some/python/fastcgi/script" is executable with a


header, then

/etc/rc.d/spawnfcgi start
/etc/rc.d/spawnfcgi stop

diff --git a/www/spawn-fcgi/files/ b/www/spawn-fcgi/files/
index ba391ac..4e73973 100644
--- a/www/spawn-fcgi/files/
+++ b/www/spawn-fcgi/files/
@@ -19,7 +19,8 @@ spawnfcgi_pid()
        job_command=$(eval echo \$${name}_${job}_command)
-       rc_pid=`check_pidfile "$pidfile" $job_command`
+        job_interpreter=$(eval echo \$${name}_${job}_interpreter)
+       rc_pid=`check_pidfile "$pidfile" $job_command $job_interpreter`




Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-When: Tue, 06 Dec 2011 06:10:10 +0000
Over to maintainer.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.