Mercurial > prosody-hg
comparison plugins/mod_posix.lua @ 6367:769a3577dd85
Merge 0.9->0.10
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 28 Aug 2014 09:23:24 +0100 |
| parents | 1056ea08970f ccae56e34956 |
| children | e011f289ec77 |
comparison
equal
deleted
inserted
replaced
| 6355:c2d144d3f8dd | 6367:769a3577dd85 |
|---|---|
| 78 | 78 |
| 79 local function write_pidfile() | 79 local function write_pidfile() |
| 80 if pidfile_handle then | 80 if pidfile_handle then |
| 81 remove_pidfile(); | 81 remove_pidfile(); |
| 82 end | 82 end |
| 83 pidfile = module:get_option("pidfile"); | 83 pidfile = module:get_option_string("pidfile"); |
| 84 if pidfile then | 84 if pidfile then |
| 85 local err; | 85 local err; |
| 86 local mode = stat(pidfile) and "r+" or "w+"; | 86 local mode = stat(pidfile) and "r+" or "w+"; |
| 87 pidfile_handle, err = io.open(pidfile, mode); | 87 pidfile_handle, err = io.open(pidfile, mode); |
| 88 if not pidfile_handle then | 88 if not pidfile_handle then |
