mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 11:20:30 +00:00
Add check to redbean to limit ProgramMaxWorkers call to the main process.
This commit is contained in:
parent
c478e101f5
commit
90c9584e67
1 changed files with 1 additions and 0 deletions
|
@ -4749,6 +4749,7 @@ static int LuaProgramHeartbeatInterval(lua_State *L) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int LuaProgramMaxWorkers(lua_State *L) {
|
static int LuaProgramMaxWorkers(lua_State *L) {
|
||||||
|
OnlyCallFromMainProcess(L, "ProgramMaxWorkers");
|
||||||
if (!lua_isinteger(L, 1) && !lua_isnoneornil(L, 1)) {
|
if (!lua_isinteger(L, 1) && !lua_isnoneornil(L, 1)) {
|
||||||
return luaL_argerror(L, 1, "invalid number of workers; integer expected");
|
return luaL_argerror(L, 1, "invalid number of workers; integer expected");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue