From 90c9584e675d4825073078932ba53d44ca8f07e4 Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Tue, 2 Aug 2022 17:11:18 -0700 Subject: [PATCH] Add check to redbean to limit ProgramMaxWorkers call to the main process. --- tool/net/redbean.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tool/net/redbean.c b/tool/net/redbean.c index f2fc02097..2b2dceb27 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -4749,6 +4749,7 @@ static int LuaProgramHeartbeatInterval(lua_State *L) { } static int LuaProgramMaxWorkers(lua_State *L) { + OnlyCallFromMainProcess(L, "ProgramMaxWorkers"); if (!lua_isinteger(L, 1) && !lua_isnoneornil(L, 1)) { return luaL_argerror(L, 1, "invalid number of workers; integer expected"); }