aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2010-12-23 09:19:01 +0100
committerLaurent Bachelier <laurent@bachelier.name>2010-12-23 19:34:48 +0100
commitea349e6acdc3b556778ed227a8ca77524c1f7f1a (patch)
tree567c9e1a5b1b779bd925297a3873e7ef2e8c80ac
parentRationalize output messages (diff)
downloadsymfttpd-ea349e6acdc3b556778ed227a8ca77524c1f7f1a.tar.xz
Create "fork" option
without any incidence for now
-rwxr-xr-xspawn7
1 files changed, 7 insertions, 0 deletions
diff --git a/spawn b/spawn
index 4260b06..52d3d12 100755
--- a/spawn
+++ b/spawn
@@ -23,6 +23,13 @@ $options['config_dir'] = $project_path.'/cache/lighttpd';
$options['log_dir'] = $project_path.'/log/lighttpd';
// hack: .sf files are not removed by symfony cc
$options['pidfile'] = $options['config_dir'].'/.sf';
+$options['fork'] = !Argument::get('s', '--single-process', false);
+if ($options['fork'] && !function_exists('pcntl_fork'))
+{
+ log_message('Warning: No fork() support.'
+ . 'symfttpd will run in single-process mode.');
+ $options['fork'] = false;
+}
if (Argument::get('K', 'kill', false))
{