Mercurial > prosody-hg
comparison plugins/mod_posix.lua @ 5452:edf3db386a19
mod_posix: Improve error message for a pposix version mismatch
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 08 Apr 2013 17:21:16 +0100 |
| parents | 941ad88db8f3 |
| children | bd0ff8ae98a8 ccae56e34956 |
comparison
equal
deleted
inserted
replaced
| 5451:941ad88db8f3 | 5452:edf3db386a19 |
|---|---|
| 8 | 8 |
| 9 | 9 |
| 10 local want_pposix_version = "0.3.6"; | 10 local want_pposix_version = "0.3.6"; |
| 11 | 11 |
| 12 local pposix = assert(require "util.pposix"); | 12 local pposix = assert(require "util.pposix"); |
| 13 if pposix._VERSION ~= want_pposix_version then module:log("warn", "Unknown version (%s) of binary pposix module, expected %s", tostring(pposix._VERSION), want_pposix_version); end | 13 if pposix._VERSION ~= want_pposix_version then |
| 14 module:log("warn", "Unknown version (%s) of binary pposix module, expected %s. Perhaps you need to recompile?", tostring(pposix._VERSION), want_pposix_version); | |
| 15 end | |
| 14 | 16 |
| 15 local signal = select(2, pcall(require, "util.signal")); | 17 local signal = select(2, pcall(require, "util.signal")); |
| 16 if type(signal) == "string" then | 18 if type(signal) == "string" then |
| 17 module:log("warn", "Couldn't load signal library, won't respond to SIGTERM"); | 19 module:log("warn", "Couldn't load signal library, won't respond to SIGTERM"); |
| 18 end | 20 end |
