about summary refs log tree commit homepage
path: root/Documentation/yahns_config.txt
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-30 20:24:58 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-31 05:04:33 +0000
commitbcac99b8cdcd0f32c4720d822d3049e3426f6cd3 (patch)
treea0b4e5cdf9388d4c5a6409106445f3c2678b27df /Documentation/yahns_config.txt
parentf9f8e25fd985b7a063da8070f3b3782b1a64a86c (diff)
downloadyahns-bcac99b8cdcd0f32c4720d822d3049e3426f6cd3.tar.gz
This allows modifying the command-line (as an array) passed to
Kernel#exec, as well as running anything necessary.
Diffstat (limited to 'Documentation/yahns_config.txt')
-rw-r--r--Documentation/yahns_config.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/yahns_config.txt b/Documentation/yahns_config.txt
index 049e305..e58e578 100644
--- a/Documentation/yahns_config.txt
+++ b/Documentation/yahns_config.txt
@@ -39,6 +39,22 @@ Ruby it is running under.
     For Rack HTTP applications, see RACK APP ARGUMENTS for more
     information.
 
+* before_exec &BLOCK
+
+    This runs &BLOCK before Kernel#exec (execve(2) wrapper).  The command
+    array to be passed to Kernel#exec may be modified within this hook:
+
+        before_exec do |cmd|
+          # you may modify ENV here inside the child process
+          ENV["MALLOC_ARENA_MAX"] = ENV["MALLOC_ARENA_TEST"] = "1"
+
+          # You may change to a different installation of Ruby or yahns
+          # by doing an in-place modification of cmd:
+          cmd.replace(%W(/another/install/of/yahns -c cfg.rb))
+        end
+
+    Default: (none)
+
 * client_expire_threshold {INTEGER|FLOAT}
 
     yahns will start expiring idle clients when it hits this threshold.