aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_console.lua5
-rw-r--r--plugins/mod_posix.lua1
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index 4180e2b6..e87ef536 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -85,9 +85,10 @@ function console_listener.onincoming(conn, data)
session.env._ = data;
- local chunk, err = loadstring("return "..data);
+ local chunkname = "=console";
+ local chunk, err = loadstring("return "..data, chunkname);
if not chunk then
- chunk, err = loadstring(data);
+ chunk, err = loadstring(data, chunkname);
if not chunk then
err = err:gsub("^%[string .-%]:%d+: ", "");
err = err:gsub("^:%d+: ", "");
diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua
index 5888ae10..c38f7eba 100644
--- a/plugins/mod_posix.lua
+++ b/plugins/mod_posix.lua
@@ -82,6 +82,7 @@ local function write_pidfile()
end
pidfile = module:get_option("pidfile");
if pidfile then
+ local err;
local mode = stat(pidfile) and "r+" or "w+";
pidfile_handle, err = io.open(pidfile, mode);
if not pidfile_handle then