Project

General

Profile

Actions

Bug #1452

closed

spawn-fcgi doesn't pass on the exit code from child's it spawns

Added by glen over 16 years ago. Updated over 15 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description


# /usr/sbin/spawn-fcgi -P /var/run/php-fcgi.pid -u http -g http -s /var/run/php/fcgi.sock.1wrOTB -f /usr/bin/php.fcgi -C 8
sh: /usr/bin/php.fcgi: not found
spawn-fcgi.c.207: child exited with: 127, Unknown error 127
# echo $?
0
Actions #1

Updated by Anonymous about 16 years ago

It is not only spawn-fcgi that displays wrong behavior. lighttpd itself has the same behavior:

root:~# /usr/sbin/lighttpd -f /etc-ro/lighttpd/lighttpd.conf
2008-01-29 11:07:35: (mod_fastcgi.c.900) bind failed for: unix:/var/run/lighttpd/php-fastcgi.socket-0 No such file or directory
2008-01-29 11:07:35: (mod_fastcgi.c.1336) ERROR: spawning fcgi failed.
2008-01-29 11:07:35: (server.c.895) Configuration of plugins failed. Going down.
root:~# echo $?
0
root:~#

This behavior makes writing a proper start/stop scripts a pain in the *ss

-- mpo

Actions #2

Updated by stbuehler over 15 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

How should a daemonized binary give you a exit value? Just run it in foreground with a superviser.

spawn-fcgi was fixed r2191 r2192, daemonize is now done a little bit later iirc.

Actions

Also available in: Atom