Mercurial > prosody-hg
comparison plugins/mod_posix.lua @ 3043:1fadbb2e3ca0
Merge with 0.6
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 17 May 2010 11:56:36 +0100 |
| parents | 692b3c6c5bd2 dec4527a7499 |
| children | 0c7beabfed5b |
comparison
equal
deleted
inserted
replaced
| 3009:06f7d8054065 | 3043:1fadbb2e3ca0 |
|---|---|
| 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("pidfile"); |
| 84 if pidfile then | 84 if pidfile then |
| 85 local err; | |
| 85 local mode = stat(pidfile) and "r+" or "w+"; | 86 local mode = stat(pidfile) and "r+" or "w+"; |
| 86 pidfile_handle, err = io.open(pidfile, mode); | 87 pidfile_handle, err = io.open(pidfile, mode); |
| 87 if not pidfile_handle then | 88 if not pidfile_handle then |
| 88 module:log("error", "Couldn't write pidfile at %s; %s", pidfile, err); | 89 module:log("error", "Couldn't write pidfile at %s; %s", pidfile, err); |
| 89 prosody.shutdown("Couldn't write pidfile"); | 90 prosody.shutdown("Couldn't write pidfile"); |
