Browse Source

Ignore pid-file option in no-fork mode (instead of producing empty file)

git-svn-id: svn://svn.lighttpd.net/spawn-fcgi/trunk@14 4a9f3682-ca7b-49a8-9a55-ba4640e46f83
master
Stefan Bühler 13 years ago
parent
commit
1b6eade60f
  1. 1
      NEWS
  2. 4
      src/spawn-fcgi.c

1
NEWS

@ -11,3 +11,4 @@ NEWS
* Only try to connect to unix socket (not tcp) before spawning (fixes again #1575)
* Only disconnect from terminal in fork mode (keep stderr/stdout open in nofork mode)
* Allow numerical user and group ids for -u/-g (fixes #1141)
* Ignore pid-file option in no-fork mode (instead of producing empty file)

4
src/spawn-fcgi.c

@ -349,7 +349,7 @@ static void show_help () {
" -C <childs> (PHP only) numbers of childs to spawn (default: not setting\n" \
" the PHP_FCGI_CHILDREN env var - php defaults to 0)\n" \
" -F <childs> numbers of childs to fork (default 1)\n" \
" -P <path> name of PID-file for spawed process\n" \
" -P <path> name of PID-file for spawed process (ignored in no-fork mode)\n" \
" -n no fork (for daemontools)\n" \
" -v show version\n" \
" -?, -h show this help\n" \
@ -433,6 +433,8 @@ int main(int argc, char **argv) {
return -1;
}
if (nofork) pid_file = NULL; /* ignore pid file in no-fork mode */
if (pid_file &&
(-1 == (pid_fd = open(pid_file, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)))) {
struct stat st;

Loading…
Cancel
Save