jbe/bsw@0: --[[-- jbe/bsw@0: execute.inner() jbe/bsw@0: jbe@321: It is MANDATORY to call this function once in each pre-fork and post-fork initializer and once in each filter of a WebMCP application. jbe@321: jbe@321: Calling execute.inner() in an initializer marks the end of initialization (the remaining code is executed when the process is terminated cleanly). jbe@321: jbe@321: Calling execute.inner() in a filter calls the next filter in the filter chain, or the view or action, if there are no more filters following. Code executed BEFORE calling this function is executed BEFORE the view or action, while code executed AFTER calling this function is executed AFTER the view of action. jbe/bsw@0: jbe/bsw@0: --]]-- jbe/bsw@0: jbe/bsw@0: function execute.inner() jbe/bsw@0: local stack = execute._wrap_stack jbe/bsw@0: local pos = #stack jbe/bsw@0: if pos == 0 then jbe/bsw@0: error("Unexpected call of execute.inner().") jbe/bsw@0: end jbe/bsw@0: local inner_func = stack[pos] jbe/bsw@0: if not inner_func then jbe/bsw@0: error("Repeated call of execute.inner().") jbe/bsw@0: end jbe/bsw@0: stack[pos] = false jbe/bsw@0: inner_func() jbe/bsw@0: end