Software /
code /
prosody
Comparison
plugins/mod_posix.lua @ 6357:ccae56e34956
mod_posix: Make sure that 'pidfile' is a string
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Aug 2014 12:02:41 +0200 |
parent | 5452:edf3db386a19 |
child | 6367:769a3577dd85 |
comparison
equal
deleted
inserted
replaced
6356:fb1535328ac7 | 6357:ccae56e34956 |
---|---|
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 |