webmcp

diff framework/bin/mcp.lua @ 229:bf690b4be420

Workaround for postfork-loading of multirand library
author jbe
date Fri Feb 27 22:45:36 2015 +0100 (2015-02-27)
parents cd7fce06440d
children 2eda136b0394
line diff
     1.1 --- a/framework/bin/mcp.lua	Fri Feb 27 22:37:46 2015 +0100
     1.2 +++ b/framework/bin/mcp.lua	Fri Feb 27 22:45:36 2015 +0100
     1.3 @@ -187,6 +187,7 @@
     1.4  
     1.5  -- interactive console mode
     1.6  if WEBMCP_MODE == "interactive" then
     1.7 +  _G.multirand = require "multirand"  -- TODO: cleaner solution
     1.8    execute.postfork_initializers()
     1.9    trace.disable()  -- avoids memory leakage (TODO: needs general solution for moonbridge?)
    1.10  end
    1.11 @@ -195,7 +196,11 @@
    1.12  if WEBMCP_MODE == "listen" then
    1.13    local http = require("moonbridge_http")
    1.14    for i, listener in ipairs(listeners) do
    1.15 -    listener.prepare = execute.postfork_initializers
    1.16 +    --listener.prepare = execute.postfork_initializers
    1.17 +    listener.prepare = function()
    1.18 +      _G.multirand = require "multirand"
    1.19 +      execute.postfork_initializers()
    1.20 +    end
    1.21      listener.connect = http.generate_handler(
    1.22        request.handler,
    1.23        request.get_http_options()

Impressum / About Us