Project

General

Profile

Feature #1847

add -d option to spawn-fcgi

Added by raphaelh over 8 years ago. Updated about 8 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
2008-12-15
Due date:
% Done:

100%


Description

fixes problems with files not found

100-spawn-fcgi_new_opt_directory.patch View - add -d option to spawn-fcgi (2.42 KB) raphaelh, 2008-12-15 16:54

Associated revisions

Revision 34 (diff)
Added by stbuehler about 8 years ago

Added option to change the directory before spawning (fixes #1847)

Revision 7897b27d (diff)
Added by Stefan B├╝hler about 8 years ago

Added option to change the directory before spawning (fixes #1847)

git-svn-id: svn://svn.lighttpd.net/spawn-fcgi/trunk@34 4a9f3682-ca7b-49a8-9a55-ba4640e46f83

History

#1 Updated by icy over 8 years ago

  • Status changed from New to Need Feedback
  • Target version deleted (1.4.20)

Err, why don't you just cd to the directory before calling spawn-fcgi?

#2 Updated by v over 8 years ago

i love this patch.

this is crap to cd in the directory before calling spawn-fcgi !!! A binary must be started anywhere and the -d option allows you to do that

#3 Updated by raphaelh over 8 years ago

icy wrote:

Err, why don't you just cd to the directory before calling spawn-fcgi?

This is not intuitive, because it behaves differently from when the fastcgi daemon is automatically spawned by lighttpd:

  • before, I was telling lighttpd to launch the fastcgi daemon automatically, everything was working fine
  • then, I began using spawn-fcgi to launch the fastcgi daemon, but it was no longer finding the files it needed

That's why I made this quick patch to have a consistent behavior between the 2 methods of launching the fastcgi daemon.

#4 Updated by Olaf-van-der-Spek over 8 years ago

raphaelh wrote:

This is not intuitive, because it behaves differently from when the fastcgi daemon is automatically spawned by lighttpd:

That's probably because relative paths are used somewhere. Why not use absolute paths?

#5 Updated by raphaelh over 8 years ago

Olaf-van-der-Spek wrote:

raphaelh wrote:

This is not intuitive, because it behaves differently from when the fastcgi daemon is automatically spawned by lighttpd:

That's probably because relative paths are used somewhere. Why not use absolute paths?

Well yeah, I could just cd before spawning, or use absolute paths

and anyway I use the small patch on my lighttpd, so it's not a problem for me...

But I was just saying that it could save some time for other people when switching from lighttpd autospawn to spawn-fcgi, as this patch was helpful for me I wanted to share :)

#6 Updated by Olaf-van-der-Spek over 8 years ago

raphaelh wrote:

and anyway I use the small patch on my lighttpd, so it's not a problem for me...

I still have no idea what the advantage of this patch over a 'manual' cd is...

#7 Updated by icy over 8 years ago

  • Status changed from Need Feedback to Patch Pending
  • Pending changed from No to Yes

Well, at least it doesn't hurt and some people might find it convenient.

#8 Updated by Olaf-van-der-Spek over 8 years ago

icy wrote:

Well, at least it doesn't hurt and some people might find it convenient.

It does increase complexity of code and parameters. That's not a positive thing. ;)

#9 Updated by stbuehler about 8 years ago

  • Project changed from Lighttpd to spawn-fcgi
  • Category deleted (spawn-fcgi)

#10 Updated by stbuehler about 8 years ago

If you want to spawn an application in a chroot and want a specific current directory before spawning, a wrapper script is a little bit overkill (and don't forget you would have to add the interpreter to the chroot...).
And as this option looks easy i just added it :)

#11 Updated by stbuehler about 8 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Applied in changeset r34.

Also available in: Atom