aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_posix.lua
Commit message (Collapse)AuthorAgeFilesLines
* mod_posix: Move everything to util.startupKim Alvefur2024-03-231-112/+1
| | | | | | | | | | | | | | | | | | | This allows greater control over the order of events. Notably, the internal ordering between daemonization, initialization of libunbound and setup of signal handling is sensitive. libunbound starts a separate thread for processing DNS requests. If this thread is started before signal handling has been set up, it will not inherit the signal handlers and instead behave as it would have before signal handlers were set up, i.e. cause the whole process to immediately exit. libunbound is usually initialized on the first DNS request, usually triggered by an outgoing s2s connection attempt. If daemonization happens before signals have been set up, signals may not be processed at all.
* mod_posix: Move POSIX signal handling into util.startup to avoid raceKim Alvefur2024-03-021-50/+0
| | | | | | | | | | When libunbound is initialized, it spawns a thread to work in. In case a module initializes libunbound, e.g. by triggering a s2s connection, Prosody would not handle signals, instead immediately quit on e.g. the reload (SIGHUP) signal. Likely because the libunbound thread would not have inherited the signal mask from the main Prosody thread. Thanks Menel, riau and franck-x for reporting and help narrowing down
* plugins: Prefix module imports with prosody namespaceKim Alvefur2023-03-241-3/+3
|
* mod_posix: Run signal handlers in the startup threadKim Alvefur2021-10-061-7/+13
|
* mod_posix: Exit with non-zero status code on problemsKim Alvefur2021-09-301-4/+4
| | | | | Previously it would default to exit with 0 as status code, meaning success, which is weird.
* mod_posix: Hook and fire events on SIGUSR1/2Matthew Wild2020-10-161-0/+15
|
* mod_posix: Daemonize laterKim Alvefur2020-09-081-3/+1
| | | | | Daemonizing later means we can use that as a "successful startup" signal and problems can be reported via exit code.
* mod_posix: Remove ancient undocumented user switchingKim Alvefur2020-08-241-31/+4
| | | | | | | | | | | | | | User switching has been done by prosodyctl or init scripts for a very long time now, so this is not needed. Using this would not have worked with module reloading (e.g. to reload certificates) since ports are closed and re-bound, which would then not be allowed. Today there exists better ways to grant low ports, i.e. capabilities(7) <Zash> Why do we have this? <MattJ> Remove it
* mod_posix: Add deprecation warning for the 'daemonize' optionKim Alvefur2020-01-261-1/+5
|
* Merge 0.11->trunkMatthew Wild2020-01-191-1/+6
|\
| * mod_posix: Support for command-line flags to override 'daemonize' config optionMatthew Wild2020-01-191-1/+6
| | | | | | | | | | -D / --daemonize -F / --no-daemonize
* | mod_posix: Remove unnecessary import of util.format (thanks luacheck and ↵Matthew Wild2019-03-261-1/+0
| | | | | | | | buildbot)
* | loggingmanager, mod_posix: Move syslog to core, fixes #541 (in a way)Matthew Wild2019-03-261-13/+0
|/
* mod_posix: Don't reload logging twiceKim Alvefur2019-01-061-1/+1
| | | | See 18eca6afb367
* mod_posix: Delay setting signal handlers until in the main threadMatthew Wild2018-03-221-18/+20
| | | | Signal handlers work by setting a debug hook. Hooks are per-thread, so we need this to be called in the main thread. However module loading is not in the main thread anymore.
* Merge 0.10->trunkKim Alvefur2017-09-141-6/+3
|\
| * loggingmanager, mod_posix: Import util.format correctly (fixes #985)Kim Alvefur2017-09-111-1/+1
| |
| * loggingmanager, mod_posix: Replace the old inconsistent log formatting with ↵Waqas Hussain2017-09-101-6/+3
| | | | | | | | the new util.format
* | Merge 0.10->trunkKim Alvefur2017-06-131-2/+3
|\|
| * mod_posix: Ignore currently unused argument [luacheck]Kim Alvefur2017-06-131-1/+1
| |
| * mod_posix: Split long line [luacheck]Kim Alvefur2017-06-131-1/+2
| |
* | Merge 0.10->trunkKim Alvefur2017-04-241-1/+1
|\|
| * mod_posix: Use typed config APIKim Alvefur2017-04-221-1/+1
| |
* | Merge 0.10->trunkKim Alvefur2017-03-281-1/+1
|\|
| * util.pposix: Remove fallocateKim Alvefur2017-02-281-1/+1
| |
| * util.pposix: Add function for atomically appending data to a fileKim Alvefur2017-03-011-1/+1
| |
* | Merge 0.10->trunkKim Alvefur2017-03-231-1/+1
|\|
| * mod_posix: Use path variant of config API for pidfile optionKim Alvefur2017-03-211-1/+1
| |
* | Merge 0.10->trunkKim Alvefur2016-11-211-1/+1
|\|
| * mod_posix: Use type-specific config APIKim Alvefur2016-11-201-1/+1
| |
* | Update every link to the documentation to use HTTPSEmmanuel Gil Peyrot2016-04-161-1/+1
|/
* mod_posix: Detect failure to load util.signal by first pcall return value ↵Kim Alvefur2015-09-261-3/+3
| | | | not by type of the second
* mod_posix: Normalize indentationKim Alvefur2015-09-261-19/+19
|
* Merge 0.9->0.10Matthew Wild2014-08-281-1/+1
|\
| * mod_posix: Make sure that 'pidfile' is a stringKim Alvefur2014-08-261-1/+1
| |
* | mod_posix: Remove compat code for 0.5Kim Alvefur2014-04-101-8/+0
| |
* | mod_posix: Daemonize by default only when installedKim Alvefur2014-01-261-1/+1
| |
* | Remove all trailing whitespaceFlorian Zeitz2013-08-091-2/+2
|/
* mod_posix: Improve error message for a pposix version mismatchMatthew Wild2013-04-081-1/+3
|
* mod_posix, util.pposix: Bump version for API changeMatthew Wild2013-04-081-1/+1
|
* mod_posix: Pass logger name to syslog, so that sources now get loggedMatthew Wild2013-04-081-2/+2
|
* mod_posix: Log a message explaining that we are detaching from the consoleKim Alvefur2012-11-111-0/+1
|
* mod_posix: Remove console and stdout logging sinks before daemonizingKim Alvefur2012-11-101-0/+8
|
* Hopefully inert commit to clean up logging across a number of modules, ↵Matthew Wild2012-07-231-6/+6
| | | | removing all cases of concatenation when building log messages
* Merge 0.9->trunkMatthew Wild2012-04-291-1/+1
|\
| * mod_posix, mod_bosh, mod_admin_telnet: Use module:set_global()Kim Alvefur2012-03-151-1/+1
| |
* | mod_posix: Support syslog_facility config optionMatthew Wild2012-04-261-1/+1
|/
* mod_posix: Remove redundant import of logger.setwriter()Matthew Wild2010-11-041-2/+0
|
* Monster whitespace commit (beware the whitespace monster).Waqas Hussain2010-10-161-7/+7
|
* mod_posix: Updated to use the new events API.Waqas Hussain2010-10-161-2/+2
|