Mercurial > prosody-hg
comparison plugins/mod_posix.lua @ 2433:65b794860e1b
mod_posix: Remove the lines added to work around the util.signal loop bug
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 10 Jan 2010 14:09:17 +0000 |
| parents | 8b20702d5b9e |
| children | 819ba949c7bc |
comparison
equal
deleted
inserted
replaced
| 2432:1e045b3e9dce | 2433:65b794860e1b |
|---|---|
| 134 | 134 |
| 135 -- Set signal handlers | 135 -- Set signal handlers |
| 136 if signal.signal then | 136 if signal.signal then |
| 137 signal.signal("SIGTERM", function () | 137 signal.signal("SIGTERM", function () |
| 138 module:log("warn", "Received SIGTERM"); | 138 module:log("warn", "Received SIGTERM"); |
| 139 signal.signal("SIGTERM", function () end); -- Fixes us getting into some kind of loop | |
| 140 prosody.unlock_globals(); | 139 prosody.unlock_globals(); |
| 141 prosody.shutdown("Received SIGTERM"); | 140 prosody.shutdown("Received SIGTERM"); |
| 142 prosody.lock_globals(); | 141 prosody.lock_globals(); |
| 143 end); | 142 end); |
| 144 | 143 |
| 148 prosody.reopen_logfiles(); | 147 prosody.reopen_logfiles(); |
| 149 end); | 148 end); |
| 150 | 149 |
| 151 signal.signal("SIGINT", function () | 150 signal.signal("SIGINT", function () |
| 152 module:log("info", "Received SIGINT"); | 151 module:log("info", "Received SIGINT"); |
| 153 signal.signal("SIGINT", function () end); -- Fix to not loop | |
| 154 prosody.unlock_globals(); | 152 prosody.unlock_globals(); |
| 155 prosody.shutdown("Received SIGINT"); | 153 prosody.shutdown("Received SIGINT"); |
| 156 prosody.lock_globals(); | 154 prosody.lock_globals(); |
| 157 end); | 155 end); |
| 158 end | 156 end |
